Skip to content

Commit

Permalink
Reverted a change in MainGameScreen where a hostile mob would cause a…
Browse files Browse the repository at this point in the history
… game crash at the end of their lane
  • Loading branch information
BlairCannon97 committed Oct 17, 2023
1 parent 91d5dcc commit 84f9ead
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,14 +213,11 @@ public void render(float delta) {
ServiceLocator.getWaveService().getDisplay().updateMobCount();
renderer.render();

// Check if the game has ended
// Check if the game has ended
if (ServiceLocator.getGameEndService().hasGameEnded()) {
ui.getEvents().trigger("lose");
}

// Check if all waves are completed and the level has been completed
if (ServiceLocator.getWaveService().isLevelCompleted()) {
} else if (ServiceLocator.getWaveService().isLevelCompleted()) {
// Check if all waves are completed and the level has been completed
if (selectedLevel == 2) { // Lava level
// If it's the lava level, go to the "win" screen
ui.getEvents().trigger("win");
Expand All @@ -232,7 +229,6 @@ public void render(float delta) {
}
}
}
// Add something in to unlock the next planet/level?

@Override
public void resize(int width, int height) {
Expand Down

0 comments on commit 84f9ead

Please sign in to comment.