mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 17:02:58 +08:00
Use extension methods instead of reading directly
This commit is contained in:
parent
37387d7741
commit
af59e2c179
@ -13,7 +13,6 @@ using osu.Game.Replays.Legacy;
|
|||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Rulesets.Mods;
|
using osu.Game.Rulesets.Mods;
|
||||||
using osu.Game.Rulesets.Replays;
|
using osu.Game.Rulesets.Replays;
|
||||||
using osu.Game.Rulesets.Scoring;
|
|
||||||
using osu.Game.Users;
|
using osu.Game.Users;
|
||||||
using SharpCompress.Compressors.LZMA;
|
using SharpCompress.Compressors.LZMA;
|
||||||
|
|
||||||
@ -123,12 +122,12 @@ namespace osu.Game.Scoring.Legacy
|
|||||||
|
|
||||||
protected void CalculateAccuracy(ScoreInfo score)
|
protected void CalculateAccuracy(ScoreInfo score)
|
||||||
{
|
{
|
||||||
score.Statistics.TryGetValue(HitResult.Miss, out int countMiss);
|
int countMiss = score.GetCountMiss() ?? 0;
|
||||||
score.Statistics.TryGetValue(HitResult.Meh, out int count50);
|
int count50 = score.GetCount50() ?? 0;
|
||||||
score.Statistics.TryGetValue(HitResult.Good, out int count100);
|
int count100 = score.GetCount100() ?? 0;
|
||||||
score.Statistics.TryGetValue(HitResult.Great, out int count300);
|
int count300 = score.GetCount300() ?? 0;
|
||||||
score.Statistics.TryGetValue(HitResult.Perfect, out int countGeki);
|
int countGeki = score.GetCountGeki() ?? 0;
|
||||||
score.Statistics.TryGetValue(HitResult.Ok, out int countKatu);
|
int countKatu = score.GetCountKatu() ?? 0;
|
||||||
|
|
||||||
switch (score.Ruleset.ID)
|
switch (score.Ruleset.ID)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user