Package de.gurkenlabs.litiengine.input
Class GamepadEntityController<T extends IMobileEntity>
java.lang.Object
de.gurkenlabs.litiengine.physics.MovementController<T>
de.gurkenlabs.litiengine.input.GamepadEntityController<T>
- All Implemented Interfaces:
IEntityController
,IUpdateable
,IMovementController
public class GamepadEntityController<T extends IMobileEntity>
extends MovementController<T>
Constructor Summary
Constructors Constructor Description GamepadEntityController(T entity, boolean rotateWithRightStick)
Method Summary
Modifier and Type Method Description double
getGamepadDeadzone()
double
getGamepadRightStick()
boolean
isRotateWithRightStick()
void
setLeftStickDeadzone(double gamePadDeadzone)
void
setRightStickDeadzone(double gamePadRightStick)
void
setRotateWithRightStick(boolean rotateWithRightStick)
void
update()
This method is called by the game loop on all objects that are attached to the loop.Methods inherited from class de.gurkenlabs.litiengine.physics.MovementController
apply, attach, detach, getActiveForces, getDx, getDy, getEntity, getForce, getMoveAngle, getVelocity, handleMovement, isMovementAllowed, moveEntity, onMovementCheck, setDx, setDy, setVelocity
Constructor Details
Method Details
update
public void update()Description copied from interface:IUpdateable
This method is called by the game loop on all objects that are attached to the loop. It's called on every tick of the loop and the frequency can be configured using theClientConfiguration
.- Specified by:
update
in interfaceIUpdateable
- Overrides:
update
in classMovementController<T extends IMobileEntity>
- See Also:
ClientConfiguration.setMaxFps(int)
getGamepadDeadzone
public double getGamepadDeadzone()getGamepadRightStick
public double getGamepadRightStick()isRotateWithRightStick
public boolean isRotateWithRightStick()setRightStickDeadzone
public void setRightStickDeadzone(double gamePadRightStick)setLeftStickDeadzone
public void setLeftStickDeadzone(double gamePadDeadzone)setRotateWithRightStick
public void setRotateWithRightStick(boolean rotateWithRightStick)