/// <summary> /// Dequeues the next wave and starts it. /// </summary> void StartWave() { currentEnemyWave = enemyWaves.Dequeue(); //get the total number of enemies in that wave //which will be decremented upon each enemy death numEnemiesInCurrentWave = currentEnemyWave.GetTotalNumberOfEnemies(); //pass the wave to the enemy spawner //for it to spawn enemySpawner.SetSpawnPool(currentEnemyWave); }