com.TeamHEC.LocomotionCommotion.Game
Class GameScreen
java.lang.Object
com.TeamHEC.LocomotionCommotion.Game.GameScreen
- All Implemented Interfaces:
- com.badlogic.gdx.Screen
public class GameScreen
- extends java.lang.Object
- implements com.badlogic.gdx.Screen
- Author:
- Robert Precious
Game Screen is the Screen that handles everything in the game screen.
First we sort the Camera- create the stage, create the camera and set the dimensions and update
Then we create all the managers- these manage the actors and they are split up in to separate menu sections.
Method Summary |
static void |
create()
|
static void |
createCoreGame(Station p1Station,
Station p2Station)
Creates an instance of the core game |
void |
dispose()
|
static com.badlogic.gdx.scenes.scene2d.Stage |
getStage()
Gets the stage for the game |
void |
hide()
|
void |
pause()
|
void |
render(float delta)
|
void |
resetScreen()
Reset Screen - Sets all the boolean to start values and clears actors and resets the map. |
static void |
resetStage()
|
void |
resize(int width,
int height)
|
void |
resume()
|
static void |
setStage(com.badlogic.gdx.scenes.scene2d.Stage stage)
Sets the current stage for the core game |
void |
show()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
game
public static CoreGame game
sb
public static com.badlogic.gdx.graphics.g2d.SpriteBatch sb
camera
public com.badlogic.gdx.graphics.OrthographicCamera camera
mapManager
public static Game_Map_Manager mapManager
GameScreen
public GameScreen()
create
public static void create()
createCoreGame
public static void createCoreGame(Station p1Station,
Station p2Station)
- Creates an instance of the core game
- Parameters:
p1Station
- p2Station
-
render
public void render(float delta)
- Specified by:
render
in interface com.badlogic.gdx.Screen
resize
public void resize(int width,
int height)
- Specified by:
resize
in interface com.badlogic.gdx.Screen
show
public void show()
- Specified by:
show
in interface com.badlogic.gdx.Screen
hide
public void hide()
- Specified by:
hide
in interface com.badlogic.gdx.Screen
pause
public void pause()
- Specified by:
pause
in interface com.badlogic.gdx.Screen
resume
public void resume()
- Specified by:
resume
in interface com.badlogic.gdx.Screen
resetStage
public static void resetStage()
dispose
public void dispose()
- Specified by:
dispose
in interface com.badlogic.gdx.Screen
getStage
public static com.badlogic.gdx.scenes.scene2d.Stage getStage()
- Gets the stage for the game
- Returns:
- Stage
setStage
public static void setStage(com.badlogic.gdx.scenes.scene2d.Stage stage)
- Sets the current stage for the core game
- Parameters:
stage
-
resetScreen
public void resetScreen()
- Reset Screen - Sets all the boolean to start values and clears actors and resets the map.