Make ScoreProcessors take generic judgements.

This commit is contained in:
smoogipooo
2017-03-16 12:40:35 +09:00
parent a7ba6bbcfe
commit c82ae011fb
25 changed files with 137 additions and 56 deletions

View File

@ -1,22 +1,23 @@
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Modes.Judgements;
using osu.Game.Modes.Objects.Drawables;
using osu.Game.Modes.Osu.Judgements;
using osu.Game.Modes.Osu.Objects;
using osu.Game.Modes.UI;
namespace osu.Game.Modes.Osu
{
internal class OsuScoreProcessor : ScoreProcessor
internal class OsuScoreProcessor : ScoreProcessor<OsuHitObject, OsuJudgementInfo>
{
public OsuScoreProcessor(int hitObjectCount = 0)
: base(hitObjectCount)
public OsuScoreProcessor(HitRenderer<OsuHitObject, OsuJudgementInfo> hitRenderer)
: base(hitRenderer)
{
Health.Value = 1;
Accuracy.Value = 1;
}
protected override void UpdateCalculations(JudgementInfo judgement)
protected override void UpdateCalculations(OsuJudgementInfo judgement)
{
if (judgement != null)
{
@ -38,7 +39,7 @@ namespace osu.Game.Modes.Osu
foreach (var judgementInfo in Judgements)
{
var j = (OsuJudgementInfo)judgementInfo;
var j = judgementInfo;
score += j.ScoreValue;
maxScore += j.MaxScoreValue;
}