com.TeamHEC.LocomotionCommotion
Class LocomotionCommotion
java.lang.Object
com.badlogic.gdx.Game
com.TeamHEC.LocomotionCommotion.LocomotionCommotion
- All Implemented Interfaces:
- com.badlogic.gdx.ApplicationListener
public class LocomotionCommotion
- extends com.badlogic.gdx.Game
- Author:
- Robert Precious
This is the main class.
We create the the startMenu as a Scene and GameScreen as a Screen. There is no significant difference between the two.
Method Summary |
void |
create()
Create sets the screen to show the start scene |
void |
dispose()
|
static LocomotionCommotion |
getInstance()
|
void |
pause()
|
void |
render()
|
void |
resize(int width,
int height)
|
void |
resume()
|
void |
setGameScreen()
This Method sets the screen to the gameScreen, We dispose the startScene, create a new gameScreen reset the screen which resets the booleans to the start
setting for all the relevant gamescreen objects. |
void |
setMenuScreen()
This Method changes the screen to startScene. |
Methods inherited from class com.badlogic.gdx.Game |
getScreen, setScreen |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
gameScreen
public GameScreen gameScreen
newGame
public CoreGame newGame
screenX
public static int screenX
screenY
public static int screenY
gameMode
public static java.lang.String gameMode
player1name
public static java.lang.String player1name
player2name
public static java.lang.String player2name
turnChoice
public static int turnChoice
TITLE
public static final java.lang.String TITLE
- See Also:
- Constant Field Values
VERSION
public static final java.lang.String VERSION
- See Also:
- Constant Field Values
getInstance
public static LocomotionCommotion getInstance()
create
public void create()
- Create sets the screen to show the start scene
setGameScreen
public void setGameScreen()
- This Method sets the screen to the gameScreen, We dispose the startScene, create a new gameScreen reset the screen which resets the booleans to the start
setting for all the relevant gamescreen objects.
Finally we set the screen to gameScreen.
setMenuScreen
public void setMenuScreen()
- This Method changes the screen to startScene. We dispose gameScreen.
resize
public void resize(int width,
int height)
- Specified by:
resize
in interface com.badlogic.gdx.ApplicationListener
- Overrides:
resize
in class com.badlogic.gdx.Game
render
public void render()
- Specified by:
render
in interface com.badlogic.gdx.ApplicationListener
- Overrides:
render
in class com.badlogic.gdx.Game
pause
public void pause()
- Specified by:
pause
in interface com.badlogic.gdx.ApplicationListener
- Overrides:
pause
in class com.badlogic.gdx.Game
resume
public void resume()
- Specified by:
resume
in interface com.badlogic.gdx.ApplicationListener
- Overrides:
resume
in class com.badlogic.gdx.Game
dispose
public void dispose()
- Specified by:
dispose
in interface com.badlogic.gdx.ApplicationListener
- Overrides:
dispose
in class com.badlogic.gdx.Game