Esempio n. 1
0
        public void AddWave(Wave wave)
        {
            if (HasPath())
            {
                wave.SetPath(route.path);
                if (currentWave!=null)
                    allWaves.Enqueue(wave);
                else currentWave = wave;
            }

            maxEnemies += wave.Count();
        }
Esempio n. 2
0
        public void SpawnEnemy(GameTime gameTime)
        {
            if (currentWave.Count()==0&&allWaves.Count!=0)
                currentWave = allWaves.Dequeue();

            if (currentWave.Count() != 0)
                enemies.AddRange(currentWave.getEnemies(gameTime));
        }