WaveManager.SpawnWave C# (CSharp) Метод

SpawnWave() публичный Метод

Starts a wave from the upcomming Waves list. Ends the game when all the waves have been ran, all the enemies are dead, and the player didn't lose.
public SpawnWave ( ) : void
Результат void
    public void SpawnWave()
    {
        Wave wave = this.DequeueWave();
        if (wave != null)
        {
            objectManager.AudioManager.PlayWaveSound(wave.waveId);
            this.objectManager.gameState.waveCount++;
            this.StartCoroutine(this.CreateEnemies(wave, this.enemySpawnNodes));

            if (SendWave != null)
            {
                SendWave();
            }
        }
    }

Usage Example

Пример #1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Space))
     {
         manager.SpawnWave(1);
     }
 }
All Usage Examples Of WaveManager::SpawnWave