Exemple #1
0
 // Update is called once per frame
 void Update()
 {
     if (areWavesLeft)
     {
         if (lastWaveEndTime + timeBetweenWaves <= Time.time)
         {
             SpawnNextWave();
         }
     }
     else
     {
         if (!currentWave.AreEnemiesLeft())
         {
             if (GameObject.FindObjectOfType <Enemy> () == null)
             {
                 levelManager.Win();
             }
         }
     }
 }