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 d49816692..04353f589 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 @@ -1,18 +1,14 @@ package com.csse3200.game.components.tasks.waves; -import com.badlogic.gdx.audio.Music; import com.badlogic.gdx.audio.Sound; import com.csse3200.game.ai.tasks.DefaultTask; import com.csse3200.game.ai.tasks.PriorityTask; -import com.csse3200.game.ai.tasks.Task; import com.csse3200.game.services.GameTime; import com.csse3200.game.services.ResourceService; import com.csse3200.game.services.ServiceLocator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.List; - public class WaveTask extends DefaultTask implements PriorityTask { private static final Logger logger = LoggerFactory.getLogger(WaveTask.class); private LevelWaves level; @@ -21,10 +17,6 @@ public class WaveTask extends DefaultTask implements PriorityTask { private long nextWaveAt = 0; private int currentWaveIndex = 0; private boolean waveInProgress; - private float startTime = 0; - private float endTime = 0; - private final float INITIAL_WAIT_INTERVAL = 10; - private final int SPAWNING_INTERVAL = 10; private static final String[] waveSounds = { "sounds/waves/wave-start/Wave_Start_Alarm.ogg", @@ -83,7 +75,6 @@ public void start() { this.currentWave = level.getWave(currentWaveIndex); ServiceLocator.getWaveService().setEnemyCount(currentWave.getSize()); logger.info("Wave {} starting with {} enemies", currentWaveIndex, ServiceLocator.getWaveService().getEnemyCount()); - // endTime = globalTime.getTime() + (SPAWNING_INTERVAL * 1000); } /** @@ -101,7 +92,6 @@ public void update() { } else { // Spawn the next wave -// logger.info("No enemies remaining, begin next wave"); if (nextWaveAt == 0) { logger.info("Next wave in 10 seconds"); this.waveEnd.play(); @@ -121,16 +111,11 @@ public void update() { this.currentWave = this.level.getWave(currentWaveIndex); ServiceLocator.getWaveService().setEnemyCount(currentWave.getSize()); logger.info("Next wave {} starting with {} enemies", currentWaveIndex, ServiceLocator.getWaveService().getEnemyCount()); - //endTime = globalTime.getTime() + (SPAWNING_INTERVAL * 1000L); // reset end time } } } } else { - //logger.info("{} enemies remaining in wave {}", ServiceLocator.getWaveService().getEnemyCount(), currentWaveIndex); - //logger.info("WAVE SERVICE NUMBER: Wave Number {}",ServiceLocator.getWaveService().getWaveCount()); - //logger.info("NEXT WAVE AT {}", ServiceLocator.getWaveService().getNextWaveTime()); - //logger.info("TIME IS {}", ServiceLocator.getTimeSource().getTime()); if (waveInProgress) { this.level.spawnWave(); }