mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 10:42:55 +08:00
Add the most basic score calculation for catch
This commit is contained in:
parent
d3c58c848d
commit
60b38b2776
@ -1,7 +1,10 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// 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.Catch.Objects;
|
||||||
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.Scoring;
|
using osu.Game.Rulesets.Scoring;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
|
|
||||||
@ -9,13 +12,22 @@ namespace osu.Game.Rulesets.Catch.Scoring
|
|||||||
{
|
{
|
||||||
internal class CatchScoreProcessor : ScoreProcessor<CatchBaseHit>
|
internal class CatchScoreProcessor : ScoreProcessor<CatchBaseHit>
|
||||||
{
|
{
|
||||||
public CatchScoreProcessor()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public CatchScoreProcessor(RulesetContainer<CatchBaseHit> rulesetContainer)
|
public CatchScoreProcessor(RulesetContainer<CatchBaseHit> rulesetContainer)
|
||||||
: base(rulesetContainer)
|
: base(rulesetContainer)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void SimulateAutoplay(Beatmap<CatchBaseHit> beatmap)
|
||||||
|
{
|
||||||
|
foreach (var obj in beatmap.HitObjects)
|
||||||
|
{
|
||||||
|
var fruit = obj as Fruit;
|
||||||
|
|
||||||
|
if (fruit != null)
|
||||||
|
AddJudgement(new CatchJudgement { Result = HitResult.Perfect });
|
||||||
|
}
|
||||||
|
|
||||||
|
base.SimulateAutoplay(beatmap);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user