Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.
public class CrouchAbility
Crouching and crawling: holding down on the ground shrinks the body to
crouchHeight, keeping its feet in place. The actor stands again only when
there is room above, so it can crawl through a one-tile gap and stays crouched
under it.Fields
public int crouchHeight | Height while crouched, fixed point. |
Constructors
public CrouchAbility() |
Methods
public void process(Actor c, PlatformWorld world) | Sets velocity and claims a MovementState. |
Inherited methods
From Ability
isEnabled, setEnabled, earlyProcess, reset, lateProcess, hashState, mix
Field details
crouchHeight
public int crouchHeightHeight while crouched, fixed point.
Constructor details
CrouchAbility
public CrouchAbility()Method details
process
public void process(Actor c, PlatformWorld world)Sets velocity and claims a
MovementState.Parameters
cActor- the actor
worldPlatformWorld- the world