Move OsuJudgementInfo to its own class, remove PositionalJudgementInfo.

This commit is contained in:
smoogipooo
2017-03-15 19:23:42 +09:00
parent a9bc253b8c
commit e0e0a2726d
10 changed files with 55 additions and 43 deletions

View File

@ -3,6 +3,7 @@
using System.ComponentModel;
using osu.Game.Modes.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements;
namespace osu.Game.Modes.Osu.Objects.Drawables
{
@ -45,42 +46,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
}
}
public class OsuJudgementInfo : PositionalJudgementInfo
{
/// <summary>
/// The score the user achieved.
/// </summary>
public OsuScoreResult Score;
/// <summary>
/// The score which would be achievable on a perfect hit.
/// </summary>
public OsuScoreResult MaxScore = OsuScoreResult.Hit300;
public int ScoreValue => scoreToInt(Score);
public int MaxScoreValue => scoreToInt(MaxScore);
private int scoreToInt(OsuScoreResult result)
{
switch (result)
{
default:
return 0;
case OsuScoreResult.Hit50:
return 50;
case OsuScoreResult.Hit100:
return 100;
case OsuScoreResult.Hit300:
return 300;
case OsuScoreResult.SliderTick:
return 10;
}
}
public ComboResult Combo;
}
public enum ComboResult
{
[Description(@"")]