Class MoveAbility
java.lang.Object
com.codename1.gaming.platformer.Ability
com.codename1.gaming.platformer.MoveAbility
Horizontal movement: walking, running while
Input#RUN is held, crawling while
crouched, with separate acceleration on the ground and in the air.-
Field Summary
FieldsModifier and TypeFieldDescriptionintChange of speed per tick in the air.booleanWhetherInput#RUNis honoured.intSpeed while crouched.intChange of speed per tick on the ground.intChange of speed per tick on the ground with no input, the friction.intRunning speed, fixed point per tick.intWalking speed, fixed point per tick. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprocess(Actor c, PlatformWorld world) Sets velocity and claims aMovementState.Methods inherited from class Ability
earlyProcess, hashState, isEnabled, lateProcess, mix, reset, setEnabled
-
Field Details
-
walkSpeed
public int walkSpeedWalking speed, fixed point per tick. -
runSpeed
public int runSpeedRunning speed, fixed point per tick. -
crawlSpeed
public int crawlSpeedSpeed while crouched. -
groundAcceleration
public int groundAccelerationChange of speed per tick on the ground. -
groundDeceleration
public int groundDecelerationChange of speed per tick on the ground with no input, the friction. -
airAcceleration
public int airAccelerationChange of speed per tick in the air. -
canRun
public boolean canRunWhetherInput#RUNis honoured.
-
-
Constructor Details
-
MoveAbility
public MoveAbility()
-
-
Method Details