From dab2ea78c67a97a4219a4671cb29b417ea05fcbe Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Tue, 20 Nov 2018 18:20:36 +0100 Subject: Add currentMap to Game, waitStateChange now returns the new state --- src/subconscious/graphics/GameWindow.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/subconscious/graphics/GameWindow.java') diff --git a/src/subconscious/graphics/GameWindow.java b/src/subconscious/graphics/GameWindow.java index ce99df5..19f8ce1 100644 --- a/src/subconscious/graphics/GameWindow.java +++ b/src/subconscious/graphics/GameWindow.java @@ -88,9 +88,9 @@ public class GameWindow extends JFrame implements ActionListener { // ovserver of this.game private void loop() { while (this.game.isRunning()) { - this.game.waitStateChange(); + Game.State newState = this.game.waitStateChange(); - switch (this.game.getState()) { + switch (newState) { case MENU: this.loadMenu(); break; -- cgit v1.2.1