diff --git a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java index db2890793..a46125349 100644 --- a/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java +++ b/source/core/src/main/com/csse3200/game/areas/ForestGameArea.java @@ -206,9 +206,9 @@ public class ForestGameArea extends GameArea { "sounds/mobs/archerArrow.mp3" }; - private static final String backgroundMusic = "sounds/background/Sci-Fi1.ogg"; + private static final String BACKGROUND_MUSIC = "sounds/background/Sci-Fi1.ogg"; - private static final String[] forestMusic = {backgroundMusic}; + private static final String[] forestMusic = {BACKGROUND_MUSIC}; private Entity player; private Entity waves; @@ -893,7 +893,7 @@ private void spawnDroidTower() { } private void playMusic() { - Music music = ServiceLocator.getResourceService().getAsset(backgroundMusic, Music.class); + Music music = ServiceLocator.getResourceService().getAsset(BACKGROUND_MUSIC, Music.class); music.setLooping(true); music.setVolume(0.3f); music.play(); 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 c4388e0cf..bfd4c0b31 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 @@ -28,7 +28,7 @@ public class CurrencyDisplay extends UIComponent { private TextButton scrapsTb; private TextButton crystalsTb; private Sound clickSound; - private static final String defaultFont = "determination_mono_18"; + private static final String DEFAULT_FONT = "determination_mono_18"; /** * Adds actors to stage @@ -63,7 +63,7 @@ private void addActors() { private TextButton createButton(String imageFilePath, int value) { Drawable drawable = new TextureRegionDrawable(new TextureRegion(new Texture(imageFilePath))); TextButton.TextButtonStyle style = new TextButton.TextButtonStyle( - drawable, drawable, drawable, getSkin().getFont(defaultFont)); + drawable, drawable, drawable, getSkin().getFont(DEFAULT_FONT)); // create button TextButton tb = new TextButton(String.format("%d", value), style); 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 3f569d147..80f419d47 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 @@ -7,7 +7,6 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table; import com.badlogic.gdx.scenes.scene2d.ui.TextButton; import com.badlogic.gdx.scenes.scene2d.ui.TextTooltip; -import com.badlogic.gdx.scenes.scene2d.ui.TooltipManager; import com.badlogic.gdx.scenes.scene2d.utils.Drawable; import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable; import com.badlogic.gdx.utils.Align; @@ -16,7 +15,7 @@ public class EngineerCountDisplay extends UIComponent { private TextButton engineerTb; - private static final String defaultFont = "determination_mono_18"; + private static final String DEFAULT_FONT = "determination_mono_18"; @Override public void create() { @@ -37,7 +36,7 @@ private void addActors() { Drawable drawable = new TextureRegionDrawable(new TextureRegion( new Texture("images/engineers/engineerBanner.png"))); TextButton.TextButtonStyle style = new TextButton.TextButtonStyle( - drawable, drawable, drawable, getSkin().getFont(defaultFont)); + drawable, drawable, drawable, getSkin().getFont(DEFAULT_FONT)); String text = String.format("%d", ServiceLocator.getGameEndService().getEngineerCount()); engineerTb = new TextButton(text, style); diff --git a/source/core/src/main/com/csse3200/game/components/pausemenu/PauseMenuButtonComponent.java b/source/core/src/main/com/csse3200/game/components/pausemenu/PauseMenuButtonComponent.java index e0241e660..77591d440 100644 --- a/source/core/src/main/com/csse3200/game/components/pausemenu/PauseMenuButtonComponent.java +++ b/source/core/src/main/com/csse3200/game/components/pausemenu/PauseMenuButtonComponent.java @@ -21,8 +21,8 @@ public class PauseMenuButtonComponent extends UIComponent { private static final float Z_INDEX = 2f; private Window window; private final GdxGame game; - private static final float windowSizeX = 300; - private static final float windowSizeY = 400; + private static final float WINDOW_SIZE_X = 300; + private static final float WINDOW_SIZE_Y = 400; private final String[] sounds = { "sounds/ui/click/click_01.ogg", "sounds/ui/open_close/close_01.ogg", @@ -110,10 +110,10 @@ public void changed(ChangeEvent changeEvent, Actor actor) { window.add(planetSelectBtn).center(); window.row(); window.add(mainMenuBtn).center(); - window.setWidth(windowSizeX); - window.setHeight(windowSizeY); - window.setX((ServiceLocator.getRenderService().getStage().getWidth() / 2) - (windowSizeX / 2)); - window.setY((ServiceLocator.getRenderService().getStage().getHeight() / 2) - (windowSizeY / 2)); + window.setWidth(WINDOW_SIZE_X); + window.setHeight(WINDOW_SIZE_Y); + window.setX((ServiceLocator.getRenderService().getStage().getWidth() / 2) - (WINDOW_SIZE_X / 2)); + window.setY((ServiceLocator.getRenderService().getStage().getHeight() / 2) - (WINDOW_SIZE_Y / 2)); stage.addActor(window); } diff --git a/source/core/src/main/com/csse3200/game/components/pausemenu/PauseMenuTimeStopComponent.java b/source/core/src/main/com/csse3200/game/components/pausemenu/PauseMenuTimeStopComponent.java index e2c08c105..371c64690 100644 --- a/source/core/src/main/com/csse3200/game/components/pausemenu/PauseMenuTimeStopComponent.java +++ b/source/core/src/main/com/csse3200/game/components/pausemenu/PauseMenuTimeStopComponent.java @@ -13,6 +13,7 @@ public class PauseMenuTimeStopComponent extends Component { private Array freezeList; public PauseMenuTimeStopComponent() { + // Not implemented } /**