mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 18:53:51 +08:00
8f3fd7092e
Also moves default scale to CatchHitObject.
47 lines
1.5 KiB
C#
47 lines
1.5 KiB
C#
// 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.Beatmaps;
|
|
using osu.Game.Rulesets.Catch.Judgements;
|
|
using osu.Game.Rulesets.Catch.Objects;
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
|
using osu.Game.Rulesets.Scoring;
|
|
using osu.Game.Rulesets.UI;
|
|
|
|
namespace osu.Game.Rulesets.Catch.Scoring
|
|
{
|
|
internal class CatchScoreProcessor : ScoreProcessor<CatchHitObject>
|
|
{
|
|
public CatchScoreProcessor(RulesetContainer<CatchHitObject> rulesetContainer)
|
|
: base(rulesetContainer)
|
|
{
|
|
}
|
|
|
|
protected override void SimulateAutoplay(Beatmap<CatchHitObject> beatmap)
|
|
{
|
|
foreach (var obj in beatmap.HitObjects)
|
|
{
|
|
var stream = obj as JuiceStream;
|
|
|
|
if (stream != null)
|
|
{
|
|
AddJudgement(new CatchJudgement { Result = HitResult.Perfect });
|
|
AddJudgement(new CatchJudgement { Result = HitResult.Perfect });
|
|
|
|
foreach (var unused in stream.Ticks)
|
|
AddJudgement(new CatchJudgement { Result = HitResult.Perfect });
|
|
|
|
continue;
|
|
}
|
|
|
|
var fruit = obj as Fruit;
|
|
|
|
if (fruit != null)
|
|
AddJudgement(new CatchJudgement { Result = HitResult.Perfect });
|
|
}
|
|
|
|
base.SimulateAutoplay(beatmap);
|
|
}
|
|
}
|
|
}
|