Class CrouchAbility

java.lang.Object
com.codename1.gaming.platformer.Ability
com.codename1.gaming.platformer.CrouchAbility

public class CrouchAbility extends Ability
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.
  • 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)
      Description copied from class: Ability

      Sets velocity and claims a MovementState.

      Parameters
      • c: the actor
      • world: the world
      Specified by:
      process in class Ability