Skip to content

Commit

Permalink
Merge pull request #287 from UQcsse3200/shivam-ui-elements
Browse files Browse the repository at this point in the history
Cleaned up code smells
  • Loading branch information
The-AhmadAA authored Oct 16, 2023
2 parents 1b24d8d + f7c47d5 commit 426f1f5
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 426f1f5

Please sign in to comment.