mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Move OsuJudgementInfo to its own class, remove PositionalJudgementInfo.
This commit is contained in:
@ -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(@"")]
|
||||
|
Reference in New Issue
Block a user