Package com.dicycat.kroy.screens
Class MenuScreen
- java.lang.Object
-
- com.dicycat.kroy.screens.MenuScreen
-
- All Implemented Interfaces:
com.badlogic.gdx.Screen
public class MenuScreen extends java.lang.Object implements com.badlogic.gdx.Screen
Main Menu screen- Author:
- Michele Imbriani
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MenuScreen.MenuScreenState
Used to define the current state of the screen, MAINMENU is used mostly but then TRUCKSELECT used when the "NewGame" button has been pressed
-
Field Summary
Fields Modifier and Type Field Description static com.badlogic.gdx.audio.Music
music
static float
musicVolume
MenuScreen.MenuScreenState
state
-
Constructor Summary
Constructors Constructor Description MenuScreen(Kroy game)
-
Method Summary
Modifier and Type Method Description void
clickCheck()
Checks if any of the buttons have been pressed and the number of the fireTruck type is passed to the new GameScreenvoid
dispose()
void
hide()
void
pause()
void
render(float delta)
Enum allows to make the MenuScreen behave differently depending on whether it's in mainMenu, Options or fireTruckSelectionvoid
resize(int width, int height)
void
resume()
void
setCurrentlyRunningGame(boolean state)
void
setGameState(MenuScreen.MenuScreenState state)
void
show()
void
startGame(int truckNum)
-
-
-
Field Detail
-
music
public static com.badlogic.gdx.audio.Music music
-
musicVolume
public static float musicVolume
-
state
public MenuScreen.MenuScreenState state
-
-
Constructor Detail
-
MenuScreen
public MenuScreen(Kroy game)
- Parameters:
game
-
-
-
Method Detail
-
show
public void show()
- Specified by:
show
in interfacecom.badlogic.gdx.Screen
-
render
public void render(float delta)
Enum allows to make the MenuScreen behave differently depending on whether it's in mainMenu, Options or fireTruckSelection- Specified by:
render
in interfacecom.badlogic.gdx.Screen
-
setGameState
public void setGameState(MenuScreen.MenuScreenState state)
- Parameters:
state
-
-
clickCheck
public void clickCheck()
Checks if any of the buttons have been pressed and the number of the fireTruck type is passed to the new GameScreen
-
startGame
public void startGame(int truckNum)
- Parameters:
truckNum
- Type of truck selected
-
setCurrentlyRunningGame
public void setCurrentlyRunningGame(boolean state)
- Parameters:
state
-
-
resize
public void resize(int width, int height)
- Specified by:
resize
in interfacecom.badlogic.gdx.Screen
-
pause
public void pause()
- Specified by:
pause
in interfacecom.badlogic.gdx.Screen
-
resume
public void resume()
- Specified by:
resume
in interfacecom.badlogic.gdx.Screen
-
hide
public void hide()
- Specified by:
hide
in interfacecom.badlogic.gdx.Screen
-
dispose
public void dispose()
- Specified by:
dispose
in interfacecom.badlogic.gdx.Screen
-
-