private IEnumerator SpawnAllEnemies()
{
Vector3 castOrigin = this.GetSpawnCenter();
int count = 0;
for(int i=0; i<this.enemyID.Length; i++)
{
while(this.spawnedQuantity[i] < this.enemyQuantity[i])
{
if(!this.SpawnEnemy(i, castOrigin+this.GetRandomAdd()))
{
count++;
if(count > 10)
{
count = 0;
yield return null;
}
}
}
}
}