private void StartWave()
 {
     if (_currentWave.PrepareWave())
     {
         StartCoroutine(BeginWave());
     }
     else
     {
         Debug.LogWarning("[WAVE WARNING] Skipped Wave " + waveIndex + " bad configuration");
         AdvanceWave();
     }
 }
Example #2
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Return))
     {
         spawnWaveIndex += 1;
         if (spawnWaveIndex < SpawnWaves.Count)
         {
             currentWave = SpawnWaves[spawnWaveIndex];
             currentWave.PrepareWave();
             StartCoroutine(StartSpawn());
         }
         else
         {
             Debug.Log("NO MORE WAVES");
         }
     }
 }