Karate Man shadows no longer fade to white

This commit is contained in:
Carson Kompon 2022-02-28 10:26:25 -05:00
parent 77af919722
commit 4d25bd6a31

View file

@ -108,8 +108,11 @@ namespace RhythmHeavenMania.Games.KarateMan
private IEnumerator FadeOut()
{
yield return new WaitForSeconds(Conductor.instance.secPerBeat * 3);
var shadowSprite = shadow.GetComponent<SpriteRenderer>();
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<SpriteRenderer>().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); });
}
}
}