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
ConstructorsConstructorDescriptionGameScreen(MazeRunnerGame game) GameScreen(MazeRunnerGame game, boolean loadMap) Constructor for GameScreen. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()getGame()com.badlogic.gdx.graphics.glutils.ShapeRenderervoidhandleEndOfGame(boolean victory) Sets the end of the game and determines if it was a victory or not.voidhide()voidpause()voidrender(float delta) Renders the game screen.voidresize(int width, int height) voidresume()voidshow()
-
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:
showin interfacecom.badlogic.gdx.Screen
-
render
public void render(float delta) Renders the game screen.- Specified by:
renderin interfacecom.badlogic.gdx.Screen- Parameters:
delta- The time in seconds since the last render.
-
resize
public void resize(int width, int height) - Specified by:
resizein interfacecom.badlogic.gdx.Screen
-
pause
public void pause()- Specified by:
pausein interfacecom.badlogic.gdx.Screen
-
resume
public void resume()- Specified by:
resumein interfacecom.badlogic.gdx.Screen
-
hide
public void hide()- Specified by:
hidein interfacecom.badlogic.gdx.Screen
-
dispose
public void dispose()- Specified by:
disposein interfacecom.badlogic.gdx.Screen
-
getCollectableManager
-
getShapeRenderer
public com.badlogic.gdx.graphics.glutils.ShapeRenderer getShapeRenderer() -
getGame
-