Class 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.
    • 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.