Class MovementController<T extends IMobileEntity>

java.lang.Object
de.gurkenlabs.litiengine.physics.MovementController<T>
All Implemented Interfaces:
IEntityController, IUpdateable, IMovementController
Direct Known Subclasses:
GamepadEntityController, KeyboardEntityController, MousePathController

public class MovementController<T extends IMobileEntity>
extends java.lang.Object
implements IMovementController
  • Constructor Summary

    Constructors 
    ConstructorDescription
    MovementController​(T mobileEntity) 
  • Method Summary

    Modifier and TypeMethodDescription
    voidapply​(Force force)
    Apply the force to the entity.
    voidattach() 
    voiddetach() 
    java.util.List<Force>getActiveForces()
    Gets the active forces.
    floatgetDx()
    Gets the delta x for each horizontal movement.
    floatgetDy()
    Sets the delta y for each vertical movement.
    TgetEntity() 
    ForcegetForce​(java.lang.String identifier) 
    doublegetMoveAngle() 
    doublegetVelocity()
    Get the current velocity.
    voidhandleMovement() 
    protected booleanisMovementAllowed() 
    protected voidmoveEntity​(double deltaX, double deltaY) 
    voidonMovementCheck​(java.util.function.Predicate<IMobileEntity> predicate)
    Checks given conditions before moving.
    voidsetDx​(float dx)
    Gets the delta x for each horizontal movement.
    voidsetDy​(float dy)
    Sets the delta y for each vertical movement.
    voidsetVelocity​(double velocity)
    Sets the current velocity.
    voidupdate()
    This method is called by the game loop on all objects that are attached to the loop.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait