//--- Unity Methods ---// private void Awake() { // Init the private variables m_enemiesLeftToSpawn = new List <GameObject>(); m_currentWave = null; m_currentWaveIdx = 0; }
//--- Methods ---// public void StartWave() { if (m_currentWaveIdx < m_waves.Count) { // TEMP: Output the current wave Debug.Log("Starting wave #" + (m_currentWaveIdx + 1).ToString()); // Set the current wave reference m_currentWave = m_waves[m_currentWaveIdx]; // Start by having the wave object generate the list of enemies to spawn m_enemiesLeftToSpawn = m_currentWave.GenerateEnemyList(); } }