From 772789a9f711715e0984bb6b93fbff0acd552e59 Mon Sep 17 00:00:00 2001 From: BlairCannon97 Date: Fri, 29 Sep 2023 10:01:39 +1000 Subject: [PATCH] Sounds trigger correctly at the beginning and end of each wave --- .../main/com/csse3200/game/components/tasks/waves/WaveTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 b67f42edf..52691fa25 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 @@ -98,12 +98,12 @@ public void update() { // Check if level has been completed - no more waves remaining if (currentWaveIndex == this.level.getNumWaves()) { logger.info("No waves remaining, level completed"); - this.waveEnd.play(); ServiceLocator.getWaveService().setLevelCompleted(); } else { // Spawn the next wave logger.info("No enemies remaining, begin next wave"); + this.waveEnd.play(); this.waveInProgress = true; this.level.setWaveIndex(currentWaveIndex); this.currentWave = this.level.getWave(currentWaveIndex);