summaryrefslogtreecommitdiffstats
path: root/src/subconscious/graphics/GameWindow.java
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-11-20 18:20:36 +0100
committerNao Pross <naopross@thearcway.org>2018-11-20 18:21:33 +0100
commitdab2ea78c67a97a4219a4671cb29b417ea05fcbe (patch)
tree2b357c58959bb159431ac0db2921dbfc5048d6a7 /src/subconscious/graphics/GameWindow.java
parentRefractor MapScene (diff)
downloadSubconscious-java-dab2ea78c67a97a4219a4671cb29b417ea05fcbe.tar.gz
Subconscious-java-dab2ea78c67a97a4219a4671cb29b417ea05fcbe.zip
Add currentMap to Game, waitStateChange now returns the new state
Diffstat (limited to '')
-rw-r--r--src/subconscious/graphics/GameWindow.java4
1 files changed, 2 insertions, 2 deletions
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;