Class Hud

java.lang.Object
de.tum.cit.ase.maze.screens.Hud
All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable

public class Hud extends Object implements com.badlogic.gdx.utils.Disposable
Class that represents a game HUD, that shows information to the player like health.
  • 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 HUD
      spriteBatch - SpriteBatch that renders the HUD
      player - The Player 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 interface com.badlogic.gdx.utils.Disposable