mirror of https://github.com/ppy/osu
Add a way to get the score string from JugementInfo.
This commit is contained in:
parent
2c580f43e9
commit
8b71d70633
|
@ -7,5 +7,8 @@ namespace osu.Game.Modes.Catch.Judgements
|
|||
{
|
||||
public class CatchJudgementInfo : JudgementInfo
|
||||
{
|
||||
public override string ScoreString => string.Empty;
|
||||
|
||||
public override string MaxScoreString => string.Empty;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,5 +7,8 @@ namespace osu.Game.Modes.Mania.Judgements
|
|||
{
|
||||
public class ManiaJudgementInfo : JudgementInfo
|
||||
{
|
||||
public override string ScoreString => string.Empty;
|
||||
|
||||
public override string MaxScoreString => string.Empty;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
using OpenTK;
|
||||
using osu.Game.Modes.Judgements;
|
||||
using osu.Game.Modes.Osu.Objects.Drawables;
|
||||
using osu.Framework.Extensions;
|
||||
|
||||
namespace osu.Game.Modes.Osu.Judgements
|
||||
{
|
||||
|
@ -24,6 +25,10 @@ public class OsuJudgementInfo : JudgementInfo
|
|||
/// </summary>
|
||||
public OsuScoreResult MaxScore = OsuScoreResult.Hit300;
|
||||
|
||||
public override string ScoreString => Score.GetDescription();
|
||||
|
||||
public override string MaxScoreString => MaxScore.GetDescription();
|
||||
|
||||
public int ScoreValue => scoreToInt(Score);
|
||||
|
||||
public int MaxScoreValue => scoreToInt(MaxScore);
|
||||
|
|
|
@ -1,11 +1,15 @@
|
|||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Judgements
|
||||
{
|
||||
public enum TaikoHitResult
|
||||
{
|
||||
[Description("GOOD")]
|
||||
Good,
|
||||
[Description("GREAT")]
|
||||
Great
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Modes.Judgements;
|
||||
using osu.Framework.Extensions;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Judgements
|
||||
{
|
||||
|
@ -37,6 +38,10 @@ public class TaikoJudgementInfo : JudgementInfo
|
|||
/// </summary>
|
||||
public int MaxAccuracyScoreValue => NumericResultForAccuracy(MAX_HIT_RESULT);
|
||||
|
||||
public override string ScoreString => TaikoResult.GetDescription();
|
||||
|
||||
public override string MaxScoreString => MAX_HIT_RESULT.GetDescription();
|
||||
|
||||
/// <summary>
|
||||
/// Whether this Judgement has a secondary hit in the case of finishers.
|
||||
/// </summary>
|
||||
|
|
|
@ -5,10 +5,31 @@
|
|||
|
||||
namespace osu.Game.Modes.Judgements
|
||||
{
|
||||
public class JudgementInfo
|
||||
public abstract class JudgementInfo
|
||||
{
|
||||
public ulong? ComboAtHit;
|
||||
/// <summary>
|
||||
/// Whether this judgement is the result of a hit or a miss.
|
||||
/// </summary>
|
||||
public HitResult? Result;
|
||||
|
||||
/// <summary>
|
||||
/// The offset at which this judgement occurred.
|
||||
/// </summary>
|
||||
public double TimeOffset;
|
||||
|
||||
/// <summary>
|
||||
/// The combo after this judgement was processed.
|
||||
/// </summary>
|
||||
public ulong? ComboAtHit;
|
||||
|
||||
/// <summary>
|
||||
/// The string representation for the score achieved.
|
||||
/// </summary>
|
||||
public abstract string ScoreString { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The string representation for the max score achievable.
|
||||
/// </summary>
|
||||
public abstract string MaxScoreString { get; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue