Package view.overlays.gameOverlays
Class PlayingHud
java.lang.Object
view.overlays.gameOverlays.PlayingHud
The PlayingHud class is responsible for displaying the player's score and lives on the screen.
-
Method Summary
Modifier and TypeMethodDescriptionvoidDraws the HUD on the screen, including player scores and lives.static PlayingHudReturns the singleton instance of PlayingHud.voidsetPlayers(PlayingModel playingModel) Sets the player models for the HUD.
-
Method Details
-
getInstance
Returns the singleton instance of PlayingHud. If the instance is null, it creates a new instance.- Returns:
- the singleton instance of PlayingHud
-
setPlayers
Sets the player models for the HUD.- Parameters:
playingModel- the model of the playing state
-
draw
Draws the HUD on the screen, including player scores and lives.- Parameters:
g- the Graphics object to draw with
-