Example #1
0
 protected virtual void OnWaveChanged(WaveEventArgs e)
 {
     if (WaveChanged != null)
     {
         WaveChanged.Invoke(this, e);
     }
 }
Example #2
0
 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;
     }
 }
Example #3
0
    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);
    }
Example #4
0
 private void WaveStartedHandler(object sender, WaveEventArgs args)
 {
     _waveNumberText.text = args.Number.ToString();
     _waveNameText.text   = args.Info.Name;
 }
Example #5
0
 private void WaveStartedHandler(object sender, WaveEventArgs args)
 {
     _waveNumberText.text = args.Number.ToString();
     _waveNameText.text = args.Info.Name;
 }
Example #6
0
 private void WaveController_WaveStarted(object sender, WaveEventArgs args)
 {
     Button_NextWave.interactable = false;
     Text_WaveNumber.text         = "Wave: " + (args.WaveNumber + 1);
 }
Example #7
0
 private void WaveController_WaveFinished(object sender, WaveEventArgs args)
 {
     Button_NextWave.interactable = true;
     Text_WaveNumber.text         = "";
 }