public void gameWipe() { for (int i = 0; i < enemiesSpawned.Count; i++) { Destroy(enemiesSpawned[i]); } enemiesSpawned.Clear(); for (int i = 0; i < spawner.maxEnemiesSpawned; i++) { spawner.spawnEnemies(); } }
public void die() { gameplay.instance.enemiesSpawned.Remove(this.gameObject); spawner.spawnEnemies(); Destroy(this.gameObject); }