private RespawnAfter ( int index, float time ) : IEnumerator | ||
index | int | |
time | float | |
return | IEnumerator |
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;
}
}