From f6f267a43a1651deaddb1f2a013b6efdde043a99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Mon, 28 Sep 2020 16:38:30 +0200 Subject: [PATCH] Switch to strong sprite exactly once --- osu.Game.Rulesets.Taiko/Skinning/LegacyHitExplosion.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Taiko/Skinning/LegacyHitExplosion.cs b/osu.Game.Rulesets.Taiko/Skinning/LegacyHitExplosion.cs index 58dfa1747a..cd5c9c757f 100644 --- a/osu.Game.Rulesets.Taiko/Skinning/LegacyHitExplosion.cs +++ b/osu.Game.Rulesets.Taiko/Skinning/LegacyHitExplosion.cs @@ -17,6 +17,7 @@ namespace osu.Game.Rulesets.Taiko.Skinning private DrawableHit hit; private DrawableStrongNestedHit nestedStrongHit; + private bool switchedToStrongSprite; /// /// Creates a new legacy hit explosion. @@ -84,16 +85,17 @@ namespace osu.Game.Rulesets.Taiko.Skinning { base.Update(); - if (shouldSwitchToStrongSprite() && strongSprite != null) + if (shouldSwitchToStrongSprite() && !switchedToStrongSprite) { sprite.FadeOut(50, Easing.OutQuint); strongSprite.FadeIn(50, Easing.OutQuint); + switchedToStrongSprite = true; } } private bool shouldSwitchToStrongSprite() { - if (hit == null || nestedStrongHit == null) + if (hit == null || nestedStrongHit == null || strongSprite == null) return false; return nestedStrongHit.IsHit;