Add the concept of a HitJudgementResolver.

This commit is contained in:
Dean Herbert 2016-11-19 16:19:26 +09:00
parent bed50a53a7
commit 1242ae3f2a
7 changed files with 52 additions and 35 deletions

@ -1 +1 @@
Subproject commit f57175bf2035602b9451562167ddcee978c60620
Subproject commit 7f07833fabd123c924c8c4fb30ef85f422f481df

View File

@ -1,14 +0,0 @@
using System.ComponentModel;
namespace osu.Game.Modes.Osu
{
public enum ComboJudgement
{
[Description(@"")]
None,
[Description(@"Good")]
Good,
[Description(@"Amazing")]
Perfect
}
}

View File

@ -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
}
}

View File

@ -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" />

View 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
}
}

View File

@ -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; }

View File

@ -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" />