public void SetupNewWave(EnemyConfigurations.WaveConfiguration waveConfiguration) { waveStarted = true; // -- set wave configuration waveConfig = waveConfiguration; // -- store spawn bounds in global variable SetupSpawnBounds(); // -- randomize if it starts at random wave or configuration SpawnSubWave(); }
// ---- MAIN GAME LOOP METHODS ---- public void NewWave() { // -- keep track of total statistics for end of game totalEnemiesKilled += enemiesKilled; totalEnemiesAllowed += enemiesAllowed; // -- reset other variables enemiesKilled = 0; enemiesAllowed = 0; waveNumber += 1; // -- get allowable configurations based on wavenumber waveConfig = configs.GetAllowableTypesBasedOnWave(waveNumber); waveGoal = waveConfig.goal; StartCoroutine(UIManager.instance.NewWaveUI(waveNumber, waveGoal, maxEnemiesAllowed)); }