Пример #1
0
 private void Update()
 {
     if (updateUI)
     {
         waveTimerUI.UpdateTimer(waveManager.GetWaveTimer());
     }
 }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     if (!GameManager.GAME_OVER)
     {
         m_currentCooldown += Time.deltaTime;
         if (m_currentCooldown > m_nextSpawnTimer && m_unitsSpawnedInWave < m_wavesData.Waves[m_currentWaveIndex].CreaturesData.Count)
         {
             m_waveTimerUI.Activate(false);
             Spawn(m_wavesData.Waves[m_currentWaveIndex].CreaturesData[m_unitsSpawnedInWave]);
             ResetUnitsCooldown();
             m_unitsCount++;
         }
         else if (m_unitsCount == 0 && AreUnitsAllSpawned())
         {
             EndWave();
         }
         m_waveTimerUI.UpdateTimer(m_currentCooldown, m_nextSpawnTimer);
     }
 }