From 50604dc7b22624632f015fcb55c0cb44bd3f4080 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Sat, 4 Apr 2020 19:29:06 +0300 Subject: [PATCH] Update catcher hyper-dashing colours on changing hyper-dash state only --- osu.Game.Rulesets.Catch/UI/Catcher.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/osu.Game.Rulesets.Catch/UI/Catcher.cs b/osu.Game.Rulesets.Catch/UI/Catcher.cs index 49c9a77277..0b73c510d9 100644 --- a/osu.Game.Rulesets.Catch/UI/Catcher.cs +++ b/osu.Game.Rulesets.Catch/UI/Catcher.cs @@ -254,7 +254,10 @@ namespace osu.Game.Rulesets.Catch.UI hyperDashDirection = 0; if (wasHyperDashing) + { + updateCatcherColour(false); Trail &= Dashing; + } } else { @@ -264,6 +267,7 @@ namespace osu.Game.Rulesets.Catch.UI if (!wasHyperDashing) { + updateCatcherColour(true); Trail = true; var hyperDashEndGlow = createAdditiveSprite(endGlowSprites); @@ -273,15 +277,13 @@ namespace osu.Game.Rulesets.Catch.UI hyperDashEndGlow.Expire(true); } } - - updateCatcherColour(); } - private void updateCatcherColour() + private void updateCatcherColour(bool hyperDashing) { const float hyper_dash_transition_length = 180; - if (HyperDashing) + if (hyperDashing) { this.FadeColour(hyperDashColour == DefaultHyperDashColour ? Color4.OrangeRed : hyperDashColour, hyper_dash_transition_length, Easing.OutQuint); this.FadeTo(0.2f, hyper_dash_transition_length, Easing.OutQuint); @@ -389,9 +391,9 @@ namespace osu.Game.Rulesets.Catch.UI { base.SkinChanged(skin, allowFallback); - updateCatcherColour(); hyperDashColour = skin.GetHyperDashCatcherColour()?.Value ?? DefaultHyperDashColour; hyperDashEndGlowColour = skin.GetHyperDashEndGlowColour()?.Value ?? DefaultHyperDashColour; + updateCatcherColour(HyperDashing); } protected override void Update()