mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:07:44 +08:00
Rename things around to make a bit more sense.
This commit is contained in:
parent
2074812f46
commit
4e31e3b443
@ -7,8 +7,8 @@ namespace osu.Game.Modes.Catch.Judgements
|
||||
{
|
||||
public class CatchJudgement : Judgement
|
||||
{
|
||||
public override string ScoreString => string.Empty;
|
||||
public override string ResultString => string.Empty;
|
||||
|
||||
public override string MaxScoreString => string.Empty;
|
||||
public override string MaxResultString => string.Empty;
|
||||
}
|
||||
}
|
||||
|
@ -7,8 +7,8 @@ namespace osu.Game.Modes.Mania.Judgements
|
||||
{
|
||||
public class ManiaJudgement : Judgement
|
||||
{
|
||||
public override string ScoreString => string.Empty;
|
||||
public override string ResultString => string.Empty;
|
||||
|
||||
public override string MaxScoreString => string.Empty;
|
||||
public override string MaxResultString => string.Empty;
|
||||
}
|
||||
}
|
||||
|
@ -25,9 +25,9 @@ namespace osu.Game.Modes.Osu.Judgements
|
||||
/// </summary>
|
||||
public OsuScoreResult MaxScore = OsuScoreResult.Hit300;
|
||||
|
||||
public override string ScoreString => Score.GetDescription();
|
||||
public override string ResultString => Score.GetDescription();
|
||||
|
||||
public override string MaxScoreString => MaxScore.GetDescription();
|
||||
public override string MaxResultString => MaxScore.GetDescription();
|
||||
|
||||
public int ScoreValue => scoreToInt(Score);
|
||||
|
||||
|
@ -8,12 +8,12 @@ namespace osu.Game.Modes.Taiko.Judgements
|
||||
/// <summary>
|
||||
/// Drum roll ticks don't display judgement text.
|
||||
/// </summary>
|
||||
public override string ScoreString => string.Empty;
|
||||
public override string ResultString => string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Drum roll ticks don't display judgement text.
|
||||
/// </summary>
|
||||
public override string MaxScoreString => string.Empty;
|
||||
public override string MaxResultString => string.Empty;
|
||||
|
||||
protected override int NumericResultForScore(TaikoHitResult result)
|
||||
{
|
||||
|
@ -9,38 +9,38 @@ namespace osu.Game.Modes.Taiko.Judgements
|
||||
public class TaikoJudgement : Judgement
|
||||
{
|
||||
/// <summary>
|
||||
/// The maximum score value.
|
||||
/// The maximum result.
|
||||
/// </summary>
|
||||
public const TaikoHitResult MAX_HIT_RESULT = TaikoHitResult.Great;
|
||||
|
||||
/// <summary>
|
||||
/// The score value.
|
||||
/// The result.
|
||||
/// </summary>
|
||||
public TaikoHitResult TaikoResult;
|
||||
|
||||
/// <summary>
|
||||
/// The score value for the combo portion of the score.
|
||||
/// The result value for the combo portion of the score.
|
||||
/// </summary>
|
||||
public int ScoreValue => NumericResultForScore(TaikoResult);
|
||||
public int ResultValueForScore => NumericResultForScore(TaikoResult);
|
||||
|
||||
/// <summary>
|
||||
/// The score value for the accuracy portion of the score.
|
||||
/// The result value for the accuracy portion of the score.
|
||||
/// </summary>
|
||||
public int AccuracyScoreValue => NumericResultForAccuracy(TaikoResult);
|
||||
public int ResultValueForAccuracy => NumericResultForAccuracy(TaikoResult);
|
||||
|
||||
/// <summary>
|
||||
/// The maximum score value for the combo portion of the score.
|
||||
/// The maximum result value for the combo portion of the score.
|
||||
/// </summary>
|
||||
public int MaxScoreValue => NumericResultForScore(MAX_HIT_RESULT);
|
||||
public int MaxResultValueForScore => NumericResultForScore(MAX_HIT_RESULT);
|
||||
|
||||
/// <summary>
|
||||
/// The maximum score value for the accuracy portion of the score.
|
||||
/// The maximum result value for the accuracy portion of the score.
|
||||
/// </summary>
|
||||
public int MaxAccuracyScoreValue => NumericResultForAccuracy(MAX_HIT_RESULT);
|
||||
public int MaxResultValueForAccuracy => NumericResultForAccuracy(MAX_HIT_RESULT);
|
||||
|
||||
public override string ScoreString => TaikoResult.GetDescription();
|
||||
public override string ResultString => TaikoResult.GetDescription();
|
||||
|
||||
public override string MaxScoreString => MAX_HIT_RESULT.GetDescription();
|
||||
public override string MaxResultString => MAX_HIT_RESULT.GetDescription();
|
||||
|
||||
/// <summary>
|
||||
/// Whether this Judgement has a secondary hit in the case of finishers.
|
||||
@ -48,11 +48,11 @@ namespace osu.Game.Modes.Taiko.Judgements
|
||||
public bool SecondHit;
|
||||
|
||||
/// <summary>
|
||||
/// Computes the numeric score value for the combo portion of the score.
|
||||
/// Computes the numeric result value for the combo portion of the score.
|
||||
/// For the accuracy portion of the score (including accuracy percentage), see <see cref="NumericResultForAccuracy(TaikoHitResult)"/>.
|
||||
/// </summary>
|
||||
/// <param name="result">The result to compute the score value for.</param>
|
||||
/// <returns>The numeric score value.</returns>
|
||||
/// <param name="result">The result to compute the value for.</param>
|
||||
/// <returns>The numeric result value.</returns>
|
||||
protected virtual int NumericResultForScore(TaikoHitResult result)
|
||||
{
|
||||
switch (result)
|
||||
@ -67,11 +67,11 @@ namespace osu.Game.Modes.Taiko.Judgements
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Computes the numeric score value for the accuracy portion of the score.
|
||||
/// Computes the numeric result value for the accuracy portion of the score.
|
||||
/// For the combo portion of the score, see <see cref="NumericResultForScore(TaikoHitResult)"/>.
|
||||
/// </summary>
|
||||
/// <param name="result">The result to compute the score value for.</param>
|
||||
/// <returns>The numeric score value.</returns>
|
||||
/// <param name="result">The result to compute the value for.</param>
|
||||
/// <returns>The numeric result value.</returns>
|
||||
protected virtual int NumericResultForAccuracy(TaikoHitResult result)
|
||||
{
|
||||
switch (result)
|
||||
|
@ -196,7 +196,7 @@ namespace osu.Game.Modes.Taiko.Scoring
|
||||
// Apply score changes
|
||||
if (newJudgement.Result == HitResult.Hit)
|
||||
{
|
||||
double baseValue = newJudgement.ScoreValue;
|
||||
double baseValue = newJudgement.ResultValueForScore;
|
||||
|
||||
// Add bonus points for hitting a finisher with the second key
|
||||
if (newJudgement.SecondHit)
|
||||
@ -243,16 +243,16 @@ namespace osu.Game.Modes.Taiko.Scoring
|
||||
}
|
||||
|
||||
// Compute the new score + accuracy
|
||||
int score = 0;
|
||||
int maxScore = 0;
|
||||
int scoreForAccuracy = 0;
|
||||
int maxScoreForAccuracy = 0;
|
||||
|
||||
foreach (var j in Judgements)
|
||||
{
|
||||
score += j.AccuracyScoreValue;
|
||||
maxScore = j.MaxAccuracyScoreValue;
|
||||
scoreForAccuracy += j.ResultValueForAccuracy;
|
||||
maxScoreForAccuracy = j.MaxResultValueForAccuracy;
|
||||
}
|
||||
|
||||
Accuracy.Value = (double)score / maxScore;
|
||||
Accuracy.Value = (double)scoreForAccuracy / maxScoreForAccuracy;
|
||||
TotalScore.Value = comboScore + accuracyScore + bonusScore;
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ namespace osu.Game.Modes.Judgements
|
||||
|
||||
AutoSizeAxes = Axes.Both;
|
||||
|
||||
string scoreString = judgement.Result == HitResult.Hit ? judgement.ScoreString : judgement.Result.GetDescription();
|
||||
string resultString = judgement.Result == HitResult.Hit ? judgement.ResultString : judgement.Result.GetDescription();
|
||||
|
||||
Children = new[]
|
||||
{
|
||||
@ -43,7 +43,7 @@ namespace osu.Game.Modes.Judgements
|
||||
{
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
Text = scoreString.ToUpper(),
|
||||
Text = resultString.ToUpper(),
|
||||
Font = @"Venera",
|
||||
TextSize = 16
|
||||
}
|
||||
|
@ -23,13 +23,13 @@ namespace osu.Game.Modes.Judgements
|
||||
public ulong? ComboAtHit;
|
||||
|
||||
/// <summary>
|
||||
/// The string representation for the score achieved.
|
||||
/// The string representation for the result achieved.
|
||||
/// </summary>
|
||||
public abstract string ScoreString { get; }
|
||||
public abstract string ResultString { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The string representation for the max score achievable.
|
||||
/// The string representation for the max result achievable.
|
||||
/// </summary>
|
||||
public abstract string MaxScoreString { get; }
|
||||
public abstract string MaxResultString { get; }
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user