protected virtual void OnWaveChanged(WaveEventArgs e) { if (WaveChanged != null) { WaveChanged.Invoke(this, e); } }
private void OnWaveChanged(object sender, WaveEventArgs e) { if (e.wave % m_UpgradeAwardInterval == 0) { m_UpgradePanel.SetActive(true); m_UpgradePanel.GetComponent <UpgradePanel>().Init(); Time.timeScale = 0.0f; } }
public void StartNextWave() { if (m_WaveTimerCoroutine != null) { StopCoroutine(m_WaveTimerCoroutine); } m_WaveNumber++; m_WaveText.text = string.Format("Wave: {0}", m_WaveNumber); WaveEventArgs eventArgs = new WaveEventArgs() { wave = m_WaveNumber }; OnWaveChanged(eventArgs); Wave nextWave = m_Waves[rand.Next(m_Waves.Length)]; m_WaveTimerCoroutine = WaveTimer(nextWave); StartCoroutine(m_WaveTimerCoroutine); }
private void WaveStartedHandler(object sender, WaveEventArgs args) { _waveNumberText.text = args.Number.ToString(); _waveNameText.text = args.Info.Name; }
private void WaveController_WaveStarted(object sender, WaveEventArgs args) { Button_NextWave.interactable = false; Text_WaveNumber.text = "Wave: " + (args.WaveNumber + 1); }
private void WaveController_WaveFinished(object sender, WaveEventArgs args) { Button_NextWave.interactable = true; Text_WaveNumber.text = ""; }