private IEnumerator delayedEnemyAttack() { yield return(new WaitForSeconds(ENEMY_ATTACK_DELAY)); AttackDisplay enemyAttack = enemyDisplay.attacks.getRandomAttack(); if (enemyDisplay.attacks.getRandomAttack() != null) { enemyAttack.doAttack(); } else { endAttack(); } }