From ed83ac188e20c2b9e6e00de7083b90e1974dc9ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Wed, 6 May 2020 23:25:25 +0200 Subject: [PATCH] Remove special case for moving catcher sprite --- .../TestSceneHyperDashColouring.cs | 12 +----------- osu.Game.Rulesets.Catch/UI/Catcher.cs | 17 +---------------- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/osu.Game.Rulesets.Catch.Tests/TestSceneHyperDashColouring.cs b/osu.Game.Rulesets.Catch.Tests/TestSceneHyperDashColouring.cs index 589bafe400..1e708cce4b 100644 --- a/osu.Game.Rulesets.Catch.Tests/TestSceneHyperDashColouring.cs +++ b/osu.Game.Rulesets.Catch.Tests/TestSceneHyperDashColouring.cs @@ -128,17 +128,7 @@ private void checkHyperDashCatcherColour(ISkin skin, Color4 expectedCatcherColou catcherArea.MovableCatcher.SetHyperDashState(2); }); - AddUntilStep("catcher colour is correct", () => - { - var expected = expectedCatcherColour; - - if (expected == Catcher.DEFAULT_HYPER_DASH_COLOUR) - // The expected colour for Catcher.Colour is another colour - // for the default skin, assert with that instead. - expected = Catcher.DEFAULT_CATCHER_HYPER_DASH_COLOUR; - - return catcherArea.MovableCatcher.Colour == expected; - }); + AddUntilStep("catcher colour is correct", () => catcherArea.MovableCatcher.Colour == expectedCatcherColour); AddAssert("catcher trails colours are correct", () => trails.HyperDashTrailsColour == expectedCatcherColour); AddAssert("catcher end-glow colours are correct", () => trails.EndGlowSpritesColour == (expectedEndGlowColour ?? expectedCatcherColour)); diff --git a/osu.Game.Rulesets.Catch/UI/Catcher.cs b/osu.Game.Rulesets.Catch/UI/Catcher.cs index 2022cffb40..520cfeee70 100644 --- a/osu.Game.Rulesets.Catch/UI/Catcher.cs +++ b/osu.Game.Rulesets.Catch/UI/Catcher.cs @@ -28,15 +28,6 @@ public class Catcher : SkinReloadableDrawable, IKeyBindingHandler /// public static readonly Color4 DEFAULT_HYPER_DASH_COLOUR = Color4.Red; - /// - /// The default hyper-dash colour used directly for this - /// 's . - /// - /// - /// This colour is only used when no skin overrides . - /// - public static readonly Color4 DEFAULT_CATCHER_HYPER_DASH_COLOUR = Color4.OrangeRed; - /// /// The duration between transitioning to hyper-dash state. /// @@ -288,13 +279,7 @@ private void updateCatcherColour(bool hyperDashing) { if (hyperDashing) { - // special behaviour for catcher colour if no skin overrides. - var catcherColour = - hyperDashColour == DEFAULT_HYPER_DASH_COLOUR - ? DEFAULT_CATCHER_HYPER_DASH_COLOUR - : hyperDashColour; - - this.FadeColour(catcherColour, HYPER_DASH_TRANSITION_DURATION, Easing.OutQuint); + this.FadeColour(hyperDashColour, HYPER_DASH_TRANSITION_DURATION, Easing.OutQuint); this.FadeTo(0.2f, HYPER_DASH_TRANSITION_DURATION, Easing.OutQuint); } else