Class PlayerAnimationController
java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.components.player.PlayerAnimationController
public class PlayerAnimationController extends Component
This class listens to events relevant to a Player entity's state and
plays animations when player action events are triggered
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MAIN_PLAYER_ATTACK
static java.lang.String
MAIN_PLAYER_BURN
static java.lang.String
MAIN_PLAYER_CROUCH
static java.lang.String
MAIN_PLAYER_HURT
static java.lang.String
MAIN_PLAYER_JUMP
static java.lang.String
MAIN_PLAYER_PICKUP
static java.lang.String
MAIN_PLAYER_RIGHT
static java.lang.String
MAIN_PLAYER_RUN
static java.lang.String
MAIN_PLAYER_WALK
-
Constructor Summary
Constructors Constructor Description PlayerAnimationController()
-
Method Summary
Modifier and Type Method Description void
create()
The function create animation listeners and adds them to the events of the entity, so that they can be triggeredvoid
setTexturePresent(boolean texturePresent)
Methods inherited from class com.deco2800.game.components.Component
dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Field Details
-
MAIN_PLAYER_RUN
public static final java.lang.String MAIN_PLAYER_RUN- See Also:
- Constant Field Values
-
MAIN_PLAYER_PICKUP
public static final java.lang.String MAIN_PLAYER_PICKUP- See Also:
- Constant Field Values
-
MAIN_PLAYER_JUMP
public static final java.lang.String MAIN_PLAYER_JUMP- See Also:
- Constant Field Values
-
MAIN_PLAYER_ATTACK
public static final java.lang.String MAIN_PLAYER_ATTACK- See Also:
- Constant Field Values
-
MAIN_PLAYER_CROUCH
public static final java.lang.String MAIN_PLAYER_CROUCH- See Also:
- Constant Field Values
-
MAIN_PLAYER_RIGHT
public static final java.lang.String MAIN_PLAYER_RIGHT- See Also:
- Constant Field Values
-
MAIN_PLAYER_WALK
public static final java.lang.String MAIN_PLAYER_WALK- See Also:
- Constant Field Values
-
MAIN_PLAYER_HURT
public static final java.lang.String MAIN_PLAYER_HURT- See Also:
- Constant Field Values
-
MAIN_PLAYER_BURN
public static final java.lang.String MAIN_PLAYER_BURN- See Also:
- Constant Field Values
-
-
Constructor Details
-
PlayerAnimationController
public PlayerAnimationController()
-
-
Method Details
-
create
public void create()The function create animation listeners and adds them to the events of the entity, so that they can be triggered -
setTexturePresent
public void setTexturePresent(boolean texturePresent)
-