Class EntityState

java.lang.Object
rekit.logic.gameelements.entities.state.EntityState
Direct Known Subclasses:
DefaultState, FallState, JumpState, NotInitializedState

public abstract class EntityState extends Object
The abstract state an entity can be in. EntityStates determine the Entities jumping behavior.
Author:
Angelo Aracri
  • Field Details

    • entity

      protected final StateEntity entity
      The entity.
  • Constructor Details

    • EntityState

      public EntityState(StateEntity entity)
      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.