1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:17:23 +08:00

Add temporary ScoreRank assignment.

This commit is contained in:
Dean Herbert 2017-04-18 21:46:52 +09:00
parent 2bf560a371
commit 15d62a0c76
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

View File

@ -71,9 +71,26 @@ namespace osu.Game.Rulesets.Scoring
Combo = Combo,
MaxCombo = HighestCombo,
Accuracy = Accuracy,
Rank = rankFrom(Accuracy),
Date = DateTime.Now,
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>
/// Resets this ScoreProcessor to a default state.
/// </summary>