Class StatBar


  • public class StatBar
    extends GameObject
    Sprites used to display statistics for the player
    Author:
    IsaacAlbiston
    • Constructor Detail

      • StatBar

        public StatBar​(com.badlogic.gdx.math.Vector2 spawnPos,
                       java.lang.String texture,
                       int height)
        initialises the bar
        Parameters:
        spawnPos -
        texture -
        height -
    • Method Detail

      • setBarDisplay

        public void setBarDisplay​(float x)
        Changes the width of the bar to x
        Parameters:
        x -
      • update

        public void update()
        Description copied from class: GameObject
        Called every frame. Update the game object.
        Specified by:
        update in class GameObject