mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 03:52:54 +08:00
Add temporary ScoreRank assignment.
This commit is contained in:
parent
2bf560a371
commit
15d62a0c76
@ -71,9 +71,26 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
Combo = Combo,
|
Combo = Combo,
|
||||||
MaxCombo = HighestCombo,
|
MaxCombo = HighestCombo,
|
||||||
Accuracy = Accuracy,
|
Accuracy = Accuracy,
|
||||||
|
Rank = rankFrom(Accuracy),
|
||||||
|
Date = DateTime.Now,
|
||||||
Health = Health,
|
Health = Health,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private ScoreRank rankFrom(double acc)
|
||||||
|
{
|
||||||
|
if (acc == 1)
|
||||||
|
return ScoreRank.X;
|
||||||
|
if (acc > 0.95)
|
||||||
|
return ScoreRank.S;
|
||||||
|
if (acc > 0.9)
|
||||||
|
return ScoreRank.A;
|
||||||
|
if (acc > 0.8)
|
||||||
|
return ScoreRank.B;
|
||||||
|
if (acc > 0.7)
|
||||||
|
return ScoreRank.C;
|
||||||
|
return ScoreRank.D;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Resets this ScoreProcessor to a default state.
|
/// Resets this ScoreProcessor to a default state.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user