예제 #1
0
 private void Update()
 {
     DisplayResources();
     if (isWaveInProgress && unitDatabase.IsEmpty() && !enemySpawner.IsSpawning())
     {
         Debug.Log("No more enemies. Spawn next wave after time between waves.");
         isWaveInProgress = false;
     }
     else if (!isWaveInProgress)
     {
         intermissionTimer += Time.deltaTime;
         if (intermissionTimer >= timeBetweenWaves)
         {
             CycleWave();
             RestartTimers();
         }
     }
 }