mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Add MaxScore to correctly account for the maximum attainable score of DrawableHitObjects.
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
using System.ComponentModel;
|
||||
using osu.Game.Modes.Objects;
|
||||
using osu.Game.Modes.Objects.Drawables;
|
||||
using osu.Framework.Graphics;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
{
|
||||
@ -19,7 +18,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
||||
{
|
||||
}
|
||||
|
||||
public override JudgementInfo CreateJudgementInfo() => new OsuJudgementInfo();
|
||||
public override JudgementInfo CreateJudgementInfo() => new OsuJudgementInfo { MaxScore = OsuScoreResult.Hit300 };
|
||||
|
||||
protected override void UpdateState(ArmedState state)
|
||||
{
|
||||
@ -49,7 +48,37 @@ 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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user