public void AddWave(Wave wave) { if (HasPath()) { wave.SetPath(route.path); if (currentWave!=null) allWaves.Enqueue(wave); else currentWave = wave; } maxEnemies += wave.Count(); }
public void SpawnEnemy(GameTime gameTime) { if (currentWave.Count()==0&&allWaves.Count!=0) currentWave = allWaves.Dequeue(); if (currentWave.Count() != 0) enemies.AddRange(currentWave.getEnemies(gameTime)); }