mirror of
https://github.com/ppy/osu
synced 2025-01-03 21:02:22 +00:00
Add the concept of a HitJudgementResolver.
This commit is contained in:
parent
bed50a53a7
commit
1242ae3f2a
@ -1 +1 @@
|
||||
Subproject commit f57175bf2035602b9451562167ddcee978c60620
|
||||
Subproject commit 7f07833fabd123c924c8c4fb30ef85f422f481df
|
@ -1,14 +0,0 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace osu.Game.Modes.Osu
|
||||
{
|
||||
public enum ComboJudgement
|
||||
{
|
||||
[Description(@"")]
|
||||
None,
|
||||
[Description(@"Good")]
|
||||
Good,
|
||||
[Description(@"Amazing")]
|
||||
Perfect
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace osu.Game.Modes.Osu
|
||||
{
|
||||
public enum Judgement
|
||||
{
|
||||
[Description(@"Miss")]
|
||||
Miss,
|
||||
[Description(@"50")]
|
||||
Hit50,
|
||||
[Description(@"100")]
|
||||
Hit100,
|
||||
[Description(@"300")]
|
||||
Hit300,
|
||||
[Description(@"500")]
|
||||
Hit500
|
||||
}
|
||||
}
|
@ -43,13 +43,11 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="Objects\Drawables\Pieces\ApproachCircle.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\CirclePiece.cs" />
|
||||
<Compile Include="ComboJudgement.cs" />
|
||||
<Compile Include="Objects\Drawables\DrawableSlider.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\ExplodePiece.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\FlashPiece.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\GlowPiece.cs" />
|
||||
<Compile Include="Objects\Drawables\HitExplosion.cs" />
|
||||
<Compile Include="Judgement.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\NumberPiece.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\RingPiece.cs" />
|
||||
<Compile Include="Objects\Drawables\Pieces\Triangles.cs" />
|
||||
|
48
osu.Game/Modes/HitJudgementResolver.cs
Normal file
48
osu.Game/Modes/HitJudgementResolver.cs
Normal file
@ -0,0 +1,48 @@
|
||||
//Copyright (c) 2007-2016 ppy Pty Ltd <contact@ppy.sh>.
|
||||
//Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using osu.Game.Modes.Objects;
|
||||
|
||||
namespace osu.Game.Modes
|
||||
{
|
||||
public class HitJudgementResolver
|
||||
{
|
||||
public JudgementResult CheckJudgement(HitObject h) => new JudgementResult { Combo = ComboJudgement.None, Judgement = Judgement.Hit300 };
|
||||
}
|
||||
|
||||
public struct JudgementResult
|
||||
{
|
||||
public ComboJudgement Combo;
|
||||
public Judgement Judgement;
|
||||
}
|
||||
|
||||
public enum ComboJudgement
|
||||
{
|
||||
[Description(@"")]
|
||||
None,
|
||||
[Description(@"Good")]
|
||||
Good,
|
||||
[Description(@"Amazing")]
|
||||
Perfect
|
||||
}
|
||||
|
||||
public enum Judgement
|
||||
{
|
||||
[Description(@"Miss")]
|
||||
Miss,
|
||||
[Description(@"50")]
|
||||
Hit50,
|
||||
[Description(@"100")]
|
||||
Hit100,
|
||||
[Description(@"300")]
|
||||
Hit300,
|
||||
[Description(@"500")]
|
||||
Hit500
|
||||
}
|
||||
}
|
@ -22,6 +22,8 @@ namespace osu.Game.Modes
|
||||
|
||||
public abstract HitObjectParser CreateHitObjectParser();
|
||||
|
||||
public virtual HitJudgementResolver CreateHitJudgement() => new HitJudgementResolver();
|
||||
|
||||
public static void Register(Ruleset ruleset) => availableRulesets.TryAdd(ruleset.PlayMode, ruleset.GetType());
|
||||
|
||||
protected abstract PlayMode PlayMode { get; }
|
||||
|
@ -63,6 +63,7 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Modes\HitJudgementResolver.cs" />
|
||||
<Compile Include="Modes\Objects\HitObjectParser.cs" />
|
||||
<Compile Include="Overlays\DragBar.cs" />
|
||||
<Compile Include="Overlays\MusicController.cs" />
|
||||
|
Loading…
Reference in New Issue
Block a user