public class RoomArrow
extends com.badlogic.gdx.graphics.g2d.Sprite
| Modifier and Type | Field and Description |
|---|---|
private Player |
player
The player that the arrow is associated with
|
private java.lang.Boolean |
visible
Whether the arrow is to be shown or not
|
| Constructor and Description |
|---|
RoomArrow(Player player)
This constructs the RoomArrow, calling the super() method the the sprite class it extends
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(com.badlogic.gdx.graphics.g2d.Batch batch)
This is called to draw the RoomArrow
|
void |
update()
This is called every tick, all the game logic related to the RoomArrow is contained here,
it checks to see if the player is on a trigger tile (a floor mat for example) and if so displays an arrow
otherwise it is hidden
|
draw, flip, getBoundingRectangle, getColor, getHeight, getOriginX, getOriginY, getRotation, getScaleX, getScaleY, getVertices, getWidth, getX, getY, rotate, rotate90, scale, scroll, set, setAlpha, setBounds, setCenter, setCenterX, setCenterY, setColor, setColor, setColor, setFlip, setOrigin, setOriginCenter, setPosition, setRegion, setRotation, setScale, setScale, setSize, setU, setU2, setV, setV2, setX, setY, translate, translateX, translateYgetRegionHeight, getRegionWidth, getRegionX, getRegionY, getTexture, getU, getU2, getV, getV2, isFlipX, isFlipY, setRegion, setRegion, setRegion, setRegion, setRegionHeight, setRegionWidth, setRegionX, setRegionY, setTexture, split, splitprivate Player player
private java.lang.Boolean visible
public RoomArrow(Player player)
player - the player that the arrow is to be associated withpublic void draw(com.badlogic.gdx.graphics.g2d.Batch batch)
draw in class com.badlogic.gdx.graphics.g2d.Spritebatch - - the batch to draw the arrow topublic void update()