mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Combine Judgement.HitResults into one.
This commit is contained in:
@ -8,73 +8,49 @@ namespace osu.Game.Rulesets.Mania.Judgements
|
||||
{
|
||||
public class ManiaJudgement : Judgement
|
||||
{
|
||||
/// <summary>
|
||||
/// The maximum possible hit result.
|
||||
/// </summary>
|
||||
public const ManiaHitResult MAX_HIT_RESULT = ManiaHitResult.Perfect;
|
||||
|
||||
/// <summary>
|
||||
/// The result value for the combo portion of the score.
|
||||
/// </summary>
|
||||
public int ResultValueForScore => Result == HitResult.Miss ? 0 : NumericResultForScore(ManiaResult);
|
||||
|
||||
/// <summary>
|
||||
/// The result value for the accuracy portion of the score.
|
||||
/// </summary>
|
||||
public int ResultValueForAccuracy => Result == HitResult.Miss ? 0 : NumericResultForAccuracy(ManiaResult);
|
||||
|
||||
/// <summary>
|
||||
/// The maximum result value for the combo portion of the score.
|
||||
/// </summary>
|
||||
public int MaxResultValueForScore => NumericResultForScore(MAX_HIT_RESULT);
|
||||
|
||||
/// <summary>
|
||||
/// The maximum result value for the accuracy portion of the score.
|
||||
/// </summary>
|
||||
public int MaxResultValueForAccuracy => NumericResultForAccuracy(MAX_HIT_RESULT);
|
||||
public int MaxNumericAccuracyResult => NumericResultForAccuracy(HitResult.Perfect);
|
||||
|
||||
public override string ResultString => string.Empty;
|
||||
|
||||
public override string MaxResultString => string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// The hit result.
|
||||
/// </summary>
|
||||
public ManiaHitResult ManiaResult;
|
||||
|
||||
public virtual int NumericResultForScore(ManiaHitResult result)
|
||||
protected override int NumericResultFor(HitResult result)
|
||||
{
|
||||
switch (result)
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
case ManiaHitResult.Bad:
|
||||
case HitResult.Meh:
|
||||
return 50;
|
||||
case ManiaHitResult.Ok:
|
||||
case HitResult.Ok:
|
||||
return 100;
|
||||
case ManiaHitResult.Good:
|
||||
case HitResult.Good:
|
||||
return 200;
|
||||
case ManiaHitResult.Great:
|
||||
case ManiaHitResult.Perfect:
|
||||
case HitResult.Great:
|
||||
case HitResult.Perfect:
|
||||
return 300;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual int NumericResultForAccuracy(ManiaHitResult result)
|
||||
public int NumericAccuracyResult => NumericResultForAccuracy(Result);
|
||||
|
||||
/// <summary>
|
||||
/// The result value for the accuracy portion of the score.
|
||||
/// </summary>
|
||||
protected virtual int NumericResultForAccuracy(HitResult result)
|
||||
{
|
||||
switch (result)
|
||||
{
|
||||
default:
|
||||
return 0;
|
||||
case ManiaHitResult.Bad:
|
||||
case HitResult.Meh:
|
||||
return 50;
|
||||
case ManiaHitResult.Ok:
|
||||
case HitResult.Ok:
|
||||
return 100;
|
||||
case ManiaHitResult.Good:
|
||||
case HitResult.Good:
|
||||
return 200;
|
||||
case ManiaHitResult.Great:
|
||||
case HitResult.Great:
|
||||
return 300;
|
||||
case ManiaHitResult.Perfect:
|
||||
case HitResult.Perfect:
|
||||
return 305;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user