From b5d40de475cc3bee233b8f0b69627e18dd1b164b Mon Sep 17 00:00:00 2001 From: Shivam Date: Tue, 17 Oct 2023 00:00:48 +1000 Subject: [PATCH 1/2] Removed code smells from UIElementsDisplay --- .../game/components/maingame/UIElementsDisplay.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/source/core/src/main/com/csse3200/game/components/maingame/UIElementsDisplay.java b/source/core/src/main/com/csse3200/game/components/maingame/UIElementsDisplay.java index 84aa11902..ecf3c9758 100644 --- a/source/core/src/main/com/csse3200/game/components/maingame/UIElementsDisplay.java +++ b/source/core/src/main/com/csse3200/game/components/maingame/UIElementsDisplay.java @@ -12,21 +12,13 @@ import com.csse3200.game.services.ServiceLocator; import com.csse3200.game.ui.ButtonFactory; import com.csse3200.game.ui.UIComponent; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.swing.event.ChangeEvent; -import java.security.Provider; - /** * Displays a button to represent the remaining mobs left in the current wave and a button to skip to the next wave. */ public class UIElementsDisplay extends UIComponent { - private static final Logger logger = LoggerFactory.getLogger(UIElementsDisplay.class); private static final float Z_INDEX = 2f; private final Table buttonTable = new Table(); - private final Table timerTable = new Table(); private TextButton remainingMobsButton; private TextButton timerButton; @@ -97,11 +89,6 @@ public void updateTimerButton() { int totalSecs = (int) ((ServiceLocator.getWaveService().getNextWaveTime() - ServiceLocator.getTimeSource().getTime()) / 1000); - // TODO : THESE SHOULD BE REMOVED AND PLACED WHEREVER THE BOSS MOB GETS SPAWNED - if (totalSecs % 20 == 0) { - ServiceLocator.getMapService().shakeCameraMap(); - ServiceLocator.getMapService().shakeCameraGrid(); - } int seconds = totalSecs % 60; int minutes = (totalSecs % 3600) / 60; String finalTime = String.format("%02d:%02d", minutes, seconds); From 8fa4f7b374830dc76c5c012b81e0dff7eb9a355b Mon Sep 17 00:00:00 2001 From: Shivam Date: Tue, 17 Oct 2023 00:09:16 +1000 Subject: [PATCH 2/2] set debugging off for CurrencyDisplay and EngineerCountDisplay --- .../com/csse3200/game/components/gamearea/CurrencyDisplay.java | 1 - .../csse3200/game/components/gamearea/EngineerCountDisplay.java | 1 - 2 files changed, 2 deletions(-) diff --git a/source/core/src/main/com/csse3200/game/components/gamearea/CurrencyDisplay.java b/source/core/src/main/com/csse3200/game/components/gamearea/CurrencyDisplay.java index 84dfcebf0..c6dd459a2 100644 --- a/source/core/src/main/com/csse3200/game/components/gamearea/CurrencyDisplay.java +++ b/source/core/src/main/com/csse3200/game/components/gamearea/CurrencyDisplay.java @@ -59,7 +59,6 @@ private void addActors() { table.add(scrapsTb).width(scrapsTb.getWidth() * 0.5f).height(scrapsTb.getHeight() * 0.5f); table.row(); table.add(crystalsTb).width(crystalsTb.getWidth() * 0.5f).height(crystalsTb.getHeight() * 0.5f); - table.setDebug(true); stage.addActor(table); scrapsTb.setPosition(table.getX() - 200, Gdx.graphics.getHeight() - 205); diff --git a/source/core/src/main/com/csse3200/game/components/gamearea/EngineerCountDisplay.java b/source/core/src/main/com/csse3200/game/components/gamearea/EngineerCountDisplay.java index 414fce76f..f5d43987b 100644 --- a/source/core/src/main/com/csse3200/game/components/gamearea/EngineerCountDisplay.java +++ b/source/core/src/main/com/csse3200/game/components/gamearea/EngineerCountDisplay.java @@ -36,7 +36,6 @@ private void addActors() { table.top().left(); table.setFillParent(true); table.padTop(80f).padLeft(20f); - table.setDebug(true); Drawable drawable = new TextureRegionDrawable(new TextureRegion( new Texture("images/engineers/engineerBanner.png")));