From 02571ec7ae3f45df77db3d162d1bd3cc4afe640c Mon Sep 17 00:00:00 2001 From: ekrctb Date: Tue, 8 Dec 2020 15:43:17 +0900 Subject: [PATCH] Remove hit explosion on revert result --- osu.Game.Rulesets.Catch/UI/Catcher.cs | 2 ++ osu.Game.Rulesets.Catch/UI/HitExplosion.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/osu.Game.Rulesets.Catch/UI/Catcher.cs b/osu.Game.Rulesets.Catch/UI/Catcher.cs index 2bf085312f..a806e623af 100644 --- a/osu.Game.Rulesets.Catch/UI/Catcher.cs +++ b/osu.Game.Rulesets.Catch/UI/Catcher.cs @@ -258,6 +258,7 @@ namespace osu.Game.Rulesets.Catch.UI caughtFruitContainer.RemoveAll(d => d.HitObject == drawableObject.HitObject); droppedObjectTarget.RemoveAll(d => (d as DrawableCatchHitObject)?.HitObject == drawableObject.HitObject); + hitExplosionContainer.RemoveAll(d => d.HitObject == drawableObject.HitObject); } /// @@ -489,6 +490,7 @@ namespace osu.Game.Rulesets.Catch.UI if (!hitLighting.Value) return; HitExplosion hitExplosion = hitExplosionPool.Get(); + hitExplosion.HitObject = caughtObject.HitObject; hitExplosion.X = caughtObject.X; hitExplosion.Scale = new Vector2(caughtObject.HitObject.Scale); hitExplosion.ObjectColour = caughtObject.AccentColour.Value; diff --git a/osu.Game.Rulesets.Catch/UI/HitExplosion.cs b/osu.Game.Rulesets.Catch/UI/HitExplosion.cs index 24ca778248..26627422e1 100644 --- a/osu.Game.Rulesets.Catch/UI/HitExplosion.cs +++ b/osu.Game.Rulesets.Catch/UI/HitExplosion.cs @@ -7,6 +7,7 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Effects; using osu.Framework.Graphics.Pooling; using osu.Framework.Utils; +using osu.Game.Rulesets.Catch.Objects; using osuTK; using osuTK.Graphics; @@ -15,6 +16,7 @@ namespace osu.Game.Rulesets.Catch.UI public class HitExplosion : PoolableDrawable { private Color4 objectColour; + public CatchHitObject HitObject; public Color4 ObjectColour {