public void Initialize(Sprite sprite, AnimationCurve itemSpawnYCurve) { _spriteRenderer.sprite = sprite; Color prevColor = _spriteRenderer.color; Color transparent = new Color(prevColor.r, prevColor.g, prevColor.b, 0); _spriteRenderer.color = transparent; StartCoroutine(Coroutines.FadeColor(gameObject, prevColor, 1)); StartCoroutine(Coroutines.MoveAlongCurve(transform, itemSpawnYCurve, Vector3.up, 1f, false, () => { StartCoroutine(Coroutines.FadeColor(gameObject, transparent, 2, () => { Destroy(gameObject); })); })); }