private IEnumerator SetupNextWave(WaveConfig currentWave) { yield return(new WaitForSeconds(10.3f)); sc.PlayOneShot(waveReadySound); FindObjectOfType <PointSpawners>().SetWaveConfig(currentWave); remainingEnemyCount = currentWave.GetEnemiesPerWave(); EnableSpawning(); }
private IEnumerator SetupNextWave(WaveConfig currentWave) { yield return(new WaitForSeconds(5.0f)); //play sound?? Debug.Log($"Remaining enemies = {enemyRemainingCount}"); FindObjectOfType <PointSpawners>().SetWaveConfig(currentWave); enemyRemainingCount = currentWave.GetEnemiesPerWave(); //pass the wave config file to the point spawner EnableSpawning(); }