mirror of
https://github.com/ppy/osu.git
synced 2024-09-21 22:07:25 +08:00
Implement base mania judgement score.
This commit is contained in:
parent
bd5bd084fa
commit
43a7923199
@ -2,11 +2,37 @@
|
|||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Game.Rulesets.Judgements;
|
using osu.Game.Rulesets.Judgements;
|
||||||
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Mania.Judgements
|
namespace osu.Game.Rulesets.Mania.Judgements
|
||||||
{
|
{
|
||||||
public class ManiaJudgement : Judgement
|
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 override string ResultString => string.Empty;
|
public override string ResultString => string.Empty;
|
||||||
|
|
||||||
public override string MaxResultString => string.Empty;
|
public override string MaxResultString => string.Empty;
|
||||||
@ -15,5 +41,42 @@ namespace osu.Game.Rulesets.Mania.Judgements
|
|||||||
/// The hit result.
|
/// The hit result.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ManiaHitResult ManiaResult;
|
public ManiaHitResult ManiaResult;
|
||||||
|
|
||||||
|
public virtual int NumericResultForScore(ManiaHitResult result)
|
||||||
|
{
|
||||||
|
switch (result)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
case ManiaHitResult.Bad:
|
||||||
|
return 50;
|
||||||
|
case ManiaHitResult.Ok:
|
||||||
|
return 100;
|
||||||
|
case ManiaHitResult.Good:
|
||||||
|
return 200;
|
||||||
|
case ManiaHitResult.Great:
|
||||||
|
case ManiaHitResult.Perfect:
|
||||||
|
return 300;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public virtual int NumericResultForAccuracy(ManiaHitResult result)
|
||||||
|
{
|
||||||
|
switch (result)
|
||||||
|
{
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
case ManiaHitResult.Bad:
|
||||||
|
return 50;
|
||||||
|
case ManiaHitResult.Ok:
|
||||||
|
return 100;
|
||||||
|
case ManiaHitResult.Good:
|
||||||
|
return 200;
|
||||||
|
case ManiaHitResult.Great:
|
||||||
|
return 300;
|
||||||
|
case ManiaHitResult.Perfect:
|
||||||
|
return 305;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user