private IEnumerator RespawnAfter(int index, float time) { if(time > 0) yield return new WaitForSeconds(time); Vector3 castOrigin = this.GetSpawnCenter(); while(!this.SpawnEnemy(index, castOrigin+this.GetRandomAdd())) { yield return null; } }