Beispiel #1
0
 public void SpawnWave()
 {
     foreach (WaveEnemies enemy in waves[currentWave].enemies)
     {
         GameObject enemySpawning = Instantiate(EnemyPrefab, enemy.Position, Quaternion.identity);
         BasicEnemy enemyCode     = enemySpawning.GetComponent <BasicEnemy>();
         enemyCode.ChangeColor(enemy.color);
         enemyCode.OnDeath += RegisterEnemyDeath;
         TotalCurrentEnemies++;
     }
     killsCurrentWave = 0;
     currentWave++;
 }