Skip to content

Commit

Permalink
Sounds trigger correctly at the beginning and end of each wave
Browse files Browse the repository at this point in the history
  • Loading branch information
BlairCannon97 committed Sep 29, 2023
1 parent 251b0a6 commit 772789a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 772789a

Please sign in to comment.