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 ecf3c975..b1813048 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 @@ -21,6 +21,7 @@ public class UIElementsDisplay extends UIComponent { private final Table buttonTable = new Table(); private TextButton remainingMobsButton; private TextButton timerButton; + long time = 0; @Override public void create() { @@ -98,7 +99,14 @@ public void updateTimerButton() { createTimerButton(); } timerButton.setText("Next wave in: " + finalTime); + time = ServiceLocator.getTimeSource().getTime(); } else { + if (ServiceLocator.getTimeSource().getTime() < time + 2000) { + ServiceLocator.getMapService().shakeCameraMap(); + ServiceLocator.getMapService().shakeCameraGrid(); + } +// ServiceLocator.getMapService().shakeCameraMap(); +// ServiceLocator.getMapService().shakeCameraGrid(); remainingMobsButton.setDisabled(true); timerButton.addAction(new SequenceAction(Actions.fadeOut(1f), Actions.removeActor())); stage.act();