Package de.tum.cit.ase.maze.screens
Class Hud
java.lang.Object
de.tum.cit.ase.maze.screens.Hud
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable
Class that represents a game HUD, that shows information to the player like health.
-
Constructor Summary
ConstructorDescriptionHud
(com.badlogic.gdx.graphics.OrthographicCamera hudCamera, com.badlogic.gdx.graphics.g2d.SpriteBatch spriteBatch, Player player, GameScreen gameScreen, boolean enableMiniMap) Creates a new HUD -
Method Summary
-
Constructor Details
-
Hud
public Hud(com.badlogic.gdx.graphics.OrthographicCamera hudCamera, com.badlogic.gdx.graphics.g2d.SpriteBatch spriteBatch, Player player, GameScreen gameScreen, boolean enableMiniMap) Creates a new HUD- Parameters:
hudCamera
-OrthographicCamera
that looks at the HUDspriteBatch
-SpriteBatch
that renders the HUDplayer
- ThePlayer
information has to be displayed
-
-
Method Details
-
resize
public void resize(int width, int height) Called when windows is resized -
update
public void update(float dt) Updates the HUD -
render
public void render()Renders the HUD -
isMinimapEnabled
public boolean isMinimapEnabled() -
setMinimapEnabled
public void setMinimapEnabled(boolean minimapEnabled) -
getStage
public com.badlogic.gdx.scenes.scene2d.Stage getStage() -
dispose
public void dispose()- Specified by:
dispose
in interfacecom.badlogic.gdx.utils.Disposable
-