From 25d3f0ead18bceec90c477fd11a3ed5ea1908e0b Mon Sep 17 00:00:00 2001 From: ekrctb Date: Sun, 3 Jun 2018 15:31:51 +0900 Subject: [PATCH] Revert TestCaseCatcherArea --- osu.Game.Rulesets.Catch.Tests/TestCaseCatcherArea.cs | 8 ++++++-- osu.Game.Rulesets.Catch/UI/CatcherArea.cs | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/osu.Game.Rulesets.Catch.Tests/TestCaseCatcherArea.cs b/osu.Game.Rulesets.Catch.Tests/TestCaseCatcherArea.cs index 9ec39189f8..f239290ed4 100644 --- a/osu.Game.Rulesets.Catch.Tests/TestCaseCatcherArea.cs +++ b/osu.Game.Rulesets.Catch.Tests/TestCaseCatcherArea.cs @@ -16,6 +16,7 @@ namespace osu.Game.Rulesets.Catch.Tests public class TestCaseCatcherArea : OsuTestCase { private RulesetInfo catchRuleset; + private TestCatcherArea catcherArea; public override IReadOnlyList RequiredTypes => new[] { @@ -25,6 +26,7 @@ namespace osu.Game.Rulesets.Catch.Tests public TestCaseCatcherArea() { AddSliderStep("CircleSize", 0, 8, 5, createCatcher); + AddToggleStep("Hyperdash", t => catcherArea.ToggleHyperDash(t)); } private void createCatcher(float size) @@ -32,10 +34,10 @@ namespace osu.Game.Rulesets.Catch.Tests Child = new CatchInputManager(catchRuleset) { RelativeSizeAxes = Axes.Both, - Child = new TestCatcherArea(new BeatmapDifficulty { CircleSize = size }) + Child = catcherArea = new TestCatcherArea(new BeatmapDifficulty { CircleSize = size }) { Anchor = Anchor.CentreLeft, - Origin = Anchor.TopLeft + Origin = Anchor.BottomLeft }, }; } @@ -52,6 +54,8 @@ namespace osu.Game.Rulesets.Catch.Tests : base(beatmapDifficulty) { } + + public void ToggleHyperDash(bool status) => MovableCatcher.HyperDashModifier = status ? 2 : 1; } } } diff --git a/osu.Game.Rulesets.Catch/UI/CatcherArea.cs b/osu.Game.Rulesets.Catch/UI/CatcherArea.cs index 2ae1f7eb7a..d7d4691ad0 100644 --- a/osu.Game.Rulesets.Catch/UI/CatcherArea.cs +++ b/osu.Game.Rulesets.Catch/UI/CatcherArea.cs @@ -277,7 +277,7 @@ namespace osu.Game.Rulesets.Catch.UI /// The modifier multiplied to the catcher speed. /// It is always not less than 1 and it is greater than 1 if and only if the catcher is hyper-dashing. /// - protected double HyperDashModifier + public double HyperDashModifier { get => hyperDashModifier; set