// attack anim IEnumerator AnimAttack() { bool fatalDamage = enemy.MakeDamage(damage); float tmr = .0f; while (tmr < 1) { tmr += Time.deltaTime * 2; float scale = 1 + Mathf.Sin(tmr * Mathf.PI) * .2f; t.localScale = Vector3.one * scale; yield return(null); } yield return(new WaitForSeconds(.5f)); t.localScale = Vector3.one; if (fatalDamage) { gc.GameOver(enemy); } else { gc.NextMove(); } }