Class HUD

java.lang.Object
de.tum.cit.fop.maze.UI.HUD

public class HUD extends Object
Head-Up Display (HUD) for the game. Displays player health, experience, keys, status effects, and navigation arrows.
  • Constructor Details

    • HUD

      public HUD(Player player, com.badlogic.gdx.scenes.scene2d.Stage stage, MazeRunnerGame game, GameScreen gameScreen)
      Constructs the HUD.
      Parameters:
      player - The player object to track stats from.
      stage - The stage to add HUD actors to.
      game - The main game instance.
      gameScreen - The game screen instance.
  • Method Details

    • renderHUD

      public void renderHUD()
      Renders the HUD elements on the screen.
    • createArrow

      public void createArrow()
      Creates a navigation arrow pointing to the exit.
    • rotateArrow

      public void rotateArrow()
      Updates the rotation of the navigation arrow to point towards the exit.
    • deleteArrow

      public void deleteArrow()
      Removes the navigation arrow from the screen.
    • updatePlayerKeys

      public void updatePlayerKeys()
      Updates the key display based on the player's current key count.
    • updatePlayerXP

      public void updatePlayerXP()
      Updates the XP label with the player's current XP.
    • renderPlayerHP

      public void renderPlayerHP()
      Renders the player's health using heart icons.
    • updatePlayerStatusEffects

      public void updatePlayerStatusEffects()
      Updates the display of active status effects on the player.