Skip to content

Commit

Permalink
linked next wave timer to wave service
Browse files Browse the repository at this point in the history
  • Loading branch information
samsully committed Oct 4, 2023
1 parent 0ce52ff commit ba0283b
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,12 @@ public void update() {
if (nextWaveAt == 0) {
logger.info("Next wave in 10 seconds");
nextWaveAt = globalTime.getTime() + 10000;
ServiceLocator.getWaveService().setNextWaveTime(nextWaveAt);
} else {
if (globalTime.getTime() >= nextWaveAt) {
currentWaveIndex++;
logger.info("Next wave starting");
currentWaveIndex++;
ServiceLocator.getWaveService().setNextWaveTime(0);
nextWaveAt = 0;
this.waveEnd.play();
this.waveInProgress = true;
Expand Down

0 comments on commit ba0283b

Please sign in to comment.