IEnumerator keepAttacking() { while (!isDead) { torso.attack(); float delay = torso.isStaggered() ? staggerDelay : attackDelay; yield return(new WaitForSeconds(delay)); } yield return(null); }