IEnumerator TimedShotCo() { timedShot = true; int i = 0; while (i < numOfShots) { yield return(new WaitForSeconds(shotWaitTime)); theFlyingEnemyBombDrop.Shooting(enemyShotStartPos); i++; } timedShot = false; }