From 779f6e4e5cbc39aa7eb4328327560765aac4b206 Mon Sep 17 00:00:00 2001 From: James McNair Date: Tue, 3 May 2022 19:42:06 +0100 Subject: [PATCH] Fix Gold Shop --- core/src/main/java/com/mygdx/pirategame/save/GameScreen.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/java/com/mygdx/pirategame/save/GameScreen.java b/core/src/main/java/com/mygdx/pirategame/save/GameScreen.java index 83e1d630..511bc6d8 100644 --- a/core/src/main/java/com/mygdx/pirategame/save/GameScreen.java +++ b/core/src/main/java/com/mygdx/pirategame/save/GameScreen.java @@ -468,6 +468,7 @@ public void handleInput(float dt) { if (Gdx.input.isKeyJustPressed(Input.Keys.E)) { if (gameStatus == GOLD_SHOP) { closeShop(); + gameStatus = GAME_RUNNING; } else if (gameStatus == GAME_RUNNING) { openShop(); } @@ -919,6 +920,7 @@ public void closeShop() { goldShop.hide(); table.setVisible(true); pauseTable.setVisible(false); + goldShop = null; resume(); }