Class PlayingHud

java.lang.Object
view.overlays.gameOverlays.PlayingHud

public class PlayingHud extends Object
The PlayingHud class is responsible for displaying the player's score and lives on the screen.
  • Method Details

    • getInstance

      public static PlayingHud getInstance()
      Returns the singleton instance of PlayingHud. If the instance is null, it creates a new instance.
      Returns:
      the singleton instance of PlayingHud
    • setPlayers

      public void setPlayers(PlayingModel playingModel)
      Sets the player models for the HUD.
      Parameters:
      playingModel - the model of the playing state
    • draw

      public void draw(Graphics g)
      Draws the HUD on the screen, including player scores and lives.
      Parameters:
      g - the Graphics object to draw with