Package de.tum.cit.ase.maze.screens
Class GameScreen
java.lang.Object
de.tum.cit.ase.maze.screens.GameScreen
- All Implemented Interfaces:
com.badlogic.gdx.Screen
The GameScreen class is responsible for rendering the gameplay screen.
It handles the game logic and rendering of the game elements.
-
Constructor Summary
ConstructorDescriptionGameScreen
(MazeRunnerGame game) GameScreen
(MazeRunnerGame game, boolean loadMap) Constructor for GameScreen. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
getGame()
com.badlogic.gdx.graphics.glutils.ShapeRenderer
void
handleEndOfGame
(boolean victory) Sets the end of the game and determines if it was a victory or not.void
hide()
void
pause()
void
render
(float delta) Renders the game screen.void
resize
(int width, int height) void
resume()
void
show()
-
Constructor Details
-
GameScreen
-
GameScreen
Constructor for GameScreen. Sets up the camera and font.- Parameters:
game
- The main game class, used to access global resources and methods.
-
-
Method Details
-
handleEndOfGame
public void handleEndOfGame(boolean victory) Sets the end of the game and determines if it was a victory or not.- Parameters:
victory
- true if the game ended in victory, false otherwise
-
show
public void show()- Specified by:
show
in interfacecom.badlogic.gdx.Screen
-
render
public void render(float delta) Renders the game screen.- Specified by:
render
in interfacecom.badlogic.gdx.Screen
- Parameters:
delta
- The time in seconds since the last render.
-
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
-
getCollectableManager
-
getShapeRenderer
public com.badlogic.gdx.graphics.glutils.ShapeRenderer getShapeRenderer() -
getGame
-