Package com.mygdx.auber.Scenes
Class Hud
- java.lang.Object
-
- com.mygdx.auber.Scenes.Hud
-
public final class Hud extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Hud(com.badlogic.gdx.graphics.g2d.SpriteBatch batch, PlayScreen newPlayScreen, Player p)Creates the HUD using the specified SpriteBatch.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw()Draws this HUD.static intgetIncorrectArrestCount()Returns the current number of incorrect arrests.static voidincrementArrestedInfiltrators()Increments the number of arrested infiltrators.static voidincrementIncorrectArrests()Increments the number of incorrect arrests.voidupdate(Player p)Used to update the HUD every frame.
-
-
-
Constructor Detail
-
Hud
public Hud(com.badlogic.gdx.graphics.g2d.SpriteBatch batch, PlayScreen newPlayScreen, Player p)Creates the HUD using the specified SpriteBatch.- Parameters:
batch- The SpriteBatch used to draw the labels.newPlayScreen- The PlayScreen the game is operating in.p- The Player.
-
-
Method Detail
-
update
public void update(Player p)
Used to update the HUD every frame.- Parameters:
p- The player.
-
draw
public void draw()
Draws this HUD.
-
getIncorrectArrestCount
public static int getIncorrectArrestCount()
Returns the current number of incorrect arrests.- Returns:
- An int containing the current number of incorrect arrests.
-
incrementArrestedInfiltrators
public static void incrementArrestedInfiltrators()
Increments the number of arrested infiltrators.
-
incrementIncorrectArrests
public static void incrementIncorrectArrests()
Increments the number of incorrect arrests.
-
-