Beispiel #1
0
        private void LaunchNextWave(Wave wave)
        {
            wave.WaveClearedEvent -= LaunchNextWave;

            CurrentWaveIndex++;
            if (CurrentWaveIndex < TotalWavesCount)
            {
                Waves[CurrentWaveIndex].LaunchWave();
            }
            else
            {
                GlobalEventSystem<GameHasEndedEvent>.Raise(new GameHasEndedEvent(false));
            }
        }
Beispiel #2
0
 /// <summary>
 /// Handler method for taking the wave cleared
 /// </summary>
 /// <param name="wave"></param>
 private void CurrentWaveWasCleared(Wave wave)
 {
     PlayerStatus.Instance.Money += wave.CompletionMoney;
     LaunchNextWave(wave);
 }