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 TypeMethodDescriptionboolean
canJump()
Indicates whether the entity can jump.void
This method will be invoked when this entity collides with the floor.void
Logic 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:
true
if jumping is allowed,false
otherwise
-
logicLoop
public void logicLoop()Logic loop of state. -
floorCollision
public void floorCollision()This method will be invoked when this entity collides with the floor.
-