Make judgements able to be "added" plus make everything compile and run.

This commit is contained in:
smoogipooo
2017-09-06 17:02:13 +09:00
parent 84c22df3f5
commit ac8ec31b61
37 changed files with 337 additions and 361 deletions

View File

@ -4,6 +4,7 @@
using System;
using System.Linq;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Judgements;
using osu.Game.Rulesets.Mania.Judgements;
using osu.Game.Rulesets.Mania.Objects;
using osu.Game.Rulesets.Objects.Drawables;
@ -203,7 +204,7 @@ namespace osu.Game.Rulesets.Mania.Scoring
maxComboPortion = comboPortion;
}
protected override void OnNewJudgement(ManiaJudgement judgement)
protected override void OnNewJudgement(Judgement judgement)
{
bool isTick = judgement is HoldNoteTickJudgement;
@ -254,8 +255,10 @@ namespace osu.Game.Rulesets.Mania.Scoring
foreach (var j in Judgements)
{
scoreForAccuracy += j.NumericAccuracyResult;
maxScoreForAccuracy += j.MaxNumericAccuracyResult;
var maniaJudgement = (ManiaJudgement)j;
scoreForAccuracy += maniaJudgement.NumericAccuracyResult;
maxScoreForAccuracy += maniaJudgement.MaxNumericAccuracyResult;
}
Accuracy.Value = (double)scoreForAccuracy / maxScoreForAccuracy;