Class EntityState
java.lang.Object
rekit.logic.gameelements.entities.state.EntityState
- Direct Known Subclasses:
DefaultState,FallState,JumpState,NotInitializedState
The abstract state an entity can be in. EntityStates determine the
Entities jumping behavior.
- Author:
- Angelo Aracri
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanJump()Indicates whether the entity can jump.voidThis method will be invoked when this entity collides with the floor.voidLogic loop of state.
-
Field Details
-
entity
The entity.
-
-
Constructor Details
-
EntityState
Create State.- Parameters:
entity- the entity
-
-
Method Details
-
canJump
public boolean canJump()Indicates whether the entity can jump.- Returns:
trueif jumping is allowed,falseotherwise
-
logicLoop
public void logicLoop()Logic loop of state. -
floorCollision
public void floorCollision()This method will be invoked when this entity collides with the floor.
-