From 198f5fcdb731bb63e19a6d792b996f547df92be9 Mon Sep 17 00:00:00 2001 From: henrybatt Date: Thu, 19 Oct 2023 13:01:43 +1000 Subject: [PATCH] Bug with targetable component on screen switch from controls to game area --- .../core/src/main/com/csse3200/game/screens/PlanetScreen.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/src/main/com/csse3200/game/screens/PlanetScreen.java b/source/core/src/main/com/csse3200/game/screens/PlanetScreen.java index 8fd316ccf..bce2f1bc9 100644 --- a/source/core/src/main/com/csse3200/game/screens/PlanetScreen.java +++ b/source/core/src/main/com/csse3200/game/screens/PlanetScreen.java @@ -114,13 +114,13 @@ public void show() { } else { ServiceLocator.getGameStateObserverService().trigger("updatePlanet", "gameArea", currentAreaName); } + ServiceLocator.registerGameArea(this.allGameAreas.get(currentAreaName)); this.allGameAreas.get(currentAreaName).create(); this.player = allGameAreas.get(currentAreaName).getPlayer(); if ("earth".equals(name)) { showTitleBox(); } - ServiceLocator.registerGameArea(this.allGameAreas.get(currentAreaName)); } private void showTitleBox() {