2017-03-16 11:40:35 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2017-09-18 11:48:45 +08:00
|
|
|
|
using osu.Game.Beatmaps;
|
|
|
|
|
using osu.Game.Rulesets.Catch.Judgements;
|
2017-04-18 15:05:58 +08:00
|
|
|
|
using osu.Game.Rulesets.Catch.Objects;
|
2017-09-18 11:48:45 +08:00
|
|
|
|
using osu.Game.Rulesets.Objects.Drawables;
|
2017-04-18 15:05:58 +08:00
|
|
|
|
using osu.Game.Rulesets.Scoring;
|
|
|
|
|
using osu.Game.Rulesets.UI;
|
2017-03-16 11:40:35 +08:00
|
|
|
|
|
2017-04-18 15:05:58 +08:00
|
|
|
|
namespace osu.Game.Rulesets.Catch.Scoring
|
2017-03-16 11:40:35 +08:00
|
|
|
|
{
|
2017-09-06 17:05:51 +08:00
|
|
|
|
internal class CatchScoreProcessor : ScoreProcessor<CatchBaseHit>
|
2017-03-16 11:40:35 +08:00
|
|
|
|
{
|
2017-09-18 11:48:45 +08:00
|
|
|
|
public CatchScoreProcessor(RulesetContainer<CatchBaseHit> rulesetContainer)
|
|
|
|
|
: base(rulesetContainer)
|
2017-03-16 12:13:45 +08:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-18 11:48:45 +08:00
|
|
|
|
protected override void SimulateAutoplay(Beatmap<CatchBaseHit> beatmap)
|
2017-03-16 11:40:35 +08:00
|
|
|
|
{
|
2017-09-18 11:48:45 +08:00
|
|
|
|
foreach (var obj in beatmap.HitObjects)
|
|
|
|
|
{
|
2017-10-10 19:22:57 +08:00
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
2017-09-18 11:48:45 +08:00
|
|
|
|
var fruit = obj as Fruit;
|
|
|
|
|
|
|
|
|
|
if (fruit != null)
|
|
|
|
|
AddJudgement(new CatchJudgement { Result = HitResult.Perfect });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
base.SimulateAutoplay(beatmap);
|
2017-03-16 11:40:35 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|