public interface IMovementController extends IEntityController
| Modifier and Type | Method and Description |
|---|---|
void |
apply(Force force)
Apply the force to the entity.
|
java.util.List<Force> |
getActiveForces()
Gets the active forces.
|
float |
getDx()
Gets the delta x for each horizontal movement.
|
float |
getDy()
Sets the delta y for each vertical movement.
|
Force |
getForce(java.lang.String identifier) |
void |
onMovementCheck(java.util.function.Predicate<IMobileEntity> predicate)
Checks given conditions before moving.
|
void |
setDx(float dx)
Gets the delta x for each horizontal movement.
|
void |
setDy(float dy)
Sets the delta y for each vertical movement.
|
attach, detach, getEntityupdatefloat getDx()
void setDx(float dx)
dx - the new dxfloat getDy()
void setDy(float dy)
dy - the new dyvoid apply(Force force)
force - the force being applied to the entityjava.util.List<Force> getActiveForces()
Force getForce(java.lang.String identifier)
void onMovementCheck(java.util.function.Predicate<IMobileEntity> predicate)
predicate - the conditions that need to apply before moving. If they don't apply, the entity won't be moved.