コード例 #1
0
    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();
        }
    }
コード例 #2
0
 public void die()
 {
     gameplay.instance.enemiesSpawned.Remove(this.gameObject);
     spawner.spawnEnemies();
     Destroy(this.gameObject);
 }