mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Make ScoreProcessors take generic judgements.
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user