public class BackpackHud extends Hud
Modifier and Type | Field and Description |
---|---|
static float |
BACK_BUTTON_X_OFFSET
Stores the offset used to anchor the back button to the bottom-right of the screen with a certain padding.
|
static float |
BACK_BUTTON_Y_OFFSET |
static float |
BUTTON_SPACING
Stores the spacing between the buttons in the middle of the backpack.
|
static float |
HEADER_Y_OFFSET
Stores the offset between the bottom of the "Backpack" header and the top of the buttons.
|
static float |
TABLE_Y_OFFSET
Stores the y position of the table nudge the table up, so that the header is at the right position on the backpack.
|
Constructor and Description |
---|
BackpackHud(com.badlogic.gdx.scenes.scene2d.Stage stage,
com.jonathan.survivor.World world)
Accepts the Stage instance where widgets are drawn, and the world, used to manipulate the world according to button presses.
|
Modifier and Type | Method and Description |
---|---|
void |
draw(float deltaTime)
Draws the Hud to the screen using the stage.
|
void |
reset(float guiWidth,
float guiHeight)
Called whenever the current Hud of the game switches to the backpack Hud.
|
addHudListener
public static final float BUTTON_SPACING
public static final float TABLE_Y_OFFSET
public static final float HEADER_Y_OFFSET
public static final float BACK_BUTTON_X_OFFSET
public static final float BACK_BUTTON_Y_OFFSET
public BackpackHud(com.badlogic.gdx.scenes.scene2d.Stage stage, com.jonathan.survivor.World world)
public void draw(float deltaTime)
Hud
public void reset(float guiWidth, float guiHeight)