diff --git a/source/core/src/main/com/csse3200/game/components/tasks/waves/WaveTask.java b/source/core/src/main/com/csse3200/game/components/tasks/waves/WaveTask.java index d816969bf..10344f935 100644 --- a/source/core/src/main/com/csse3200/game/components/tasks/waves/WaveTask.java +++ b/source/core/src/main/com/csse3200/game/components/tasks/waves/WaveTask.java @@ -53,6 +53,7 @@ public void update() { logger.info("No enemies remaining, begin next wave"); currentWaveIndex++; this.currentWave = this.level.getWave(currentWaveIndex); + ServiceLocator.getWaveService().setEnemyCount(currentWave.getSize()); //endTime = globalTime.getTime() + (SPAWNING_INTERVAL * 1000L); // reset end time } else { logger.info("{} enemies remaining in wave {}", ServiceLocator.getWaveService().getEnemyCount(), currentWaveIndex); diff --git a/source/core/src/main/com/csse3200/game/entities/factories/WaveFactory.java b/source/core/src/main/com/csse3200/game/entities/factories/WaveFactory.java index 6007ffb55..d3cbb3094 100644 --- a/source/core/src/main/com/csse3200/game/entities/factories/WaveFactory.java +++ b/source/core/src/main/com/csse3200/game/entities/factories/WaveFactory.java @@ -16,10 +16,14 @@ public class WaveFactory { */ public static Entity createWaves() { HashMap mobs = new HashMap<>(); - mobs.put("Xeno", 5); - WaveClass wave = new WaveClass(mobs); + mobs.put("Xeno", 0); + HashMap mobs2 = new HashMap<>(); + mobs2.put("Xeno", 3); + WaveClass wave1 = new WaveClass(mobs); + WaveClass wave2 = new WaveClass(mobs2); LevelWaves level = new LevelWaves(1); - level.addWave(wave); + level.addWave(wave1); + level.addWave(wave2); AITaskComponent aiComponent = new AITaskComponent() .addTask(new WaveTask());