From ca2371c7437943750300bb4ff663647d0a19328b Mon Sep 17 00:00:00 2001 From: Carson Kompon Date: Mon, 28 Feb 2022 10:26:25 -0500 Subject: [PATCH] Karate Man shadows no longer fade to white --- Assets/Scripts/Games/KarateMan/BarrelDestroyEffect.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Games/KarateMan/BarrelDestroyEffect.cs b/Assets/Scripts/Games/KarateMan/BarrelDestroyEffect.cs index 21ddcfc6..f0089ddd 100644 --- a/Assets/Scripts/Games/KarateMan/BarrelDestroyEffect.cs +++ b/Assets/Scripts/Games/KarateMan/BarrelDestroyEffect.cs @@ -108,8 +108,11 @@ namespace RhythmHeavenMania.Games.KarateMan private IEnumerator FadeOut() { yield return new WaitForSeconds(Conductor.instance.secPerBeat * 3); + var shadowSprite = shadow.GetComponent(); + var fadeColor = shadowSprite.color; + fadeColor.a = 0; SpriteRenderer.DOColor(new Color(1, 1, 1, 0), Conductor.instance.secPerBeat * 3).OnComplete(delegate { Destroy(this.gameObject); }); - shadow.GetComponent().DOColor(new Color(1, 1, 1, 0), Conductor.instance.secPerBeat * 3).OnComplete(delegate { Destroy(shadow); }); + shadowSprite.DOColor(fadeColor, Conductor.instance.secPerBeat * 3).OnComplete(delegate { Destroy(shadow); }); } } } \ No newline at end of file