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

  1. Object
  2. Ability
  3. 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 crouchHeightHeight while crouched, fixed point.

Constructors

public CrouchAbility()

Methods

public void process(Actor c, PlatformWorld world)Sets velocity and claims a MovementState.

Inherited methods

Field details

crouchHeight

public int crouchHeight
Height 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

c Actor
the actor
world PlatformWorld
the world