private IEnumerator DestructionAnimation() { var timer = 0f; var baseScale = transform.localScale; while (timer <= 1) { timer += Time.deltaTime * _destructionSpeed; transform.localScale = Vector3.Lerp(baseScale, Vector3.zero, timer); yield return(null); } _bossManager.DestroyProjectile(gameObject); }