Enum MovementState

java.lang.Object
java.lang.Enum<MovementState>
com.codename1.gaming.platformer.MovementState
All Implemented Interfaces:
Comparable<MovementState>

public enum MovementState extends Enum<MovementState>
What a Actor is doing this tick, which a renderer maps to an animation clip (see ActorAnimator) and abilities read to stay out of each other's way.
  • Enum Constant Details

    • IDLE

      public static final MovementState IDLE
      Standing still on the ground.
    • WALKING

      public static final MovementState WALKING
      Walking.
    • RUNNING

      public static final MovementState RUNNING
      Running.
    • CROUCHING

      public static final MovementState CROUCHING
      Crouched in place.
    • CRAWLING

      public static final MovementState CRAWLING
      Moving while crouched.
    • JUMPING

      public static final MovementState JUMPING
      Rising after a jump.
    • FALLING

      public static final MovementState FALLING
      In the air, going down.
    • WALL_CLINGING

      public static final MovementState WALL_CLINGING
      Sliding down a wall.
    • DASHING

      public static final MovementState DASHING
      Mid dash.
    • CLIMBING

      public static final MovementState CLIMBING
      On a ladder.
    • JETPACKING

      public static final MovementState JETPACKING
      Thrust from a jetpack.
    • GLIDING

      public static final MovementState GLIDING
      Gliding.
    • SWIMMING

      public static final MovementState SWIMMING
      In water.
    • GRIPPING

      public static final MovementState GRIPPING
      Hanging from a ledge or a grip point.
    • PUSHING

      public static final MovementState PUSHING
      Pushing a block.
    • HURT

      public static final MovementState HURT
      Knocked back after a hit.
    • DEAD

      public static final MovementState DEAD
      Out of health.
  • Method Details

    • values

      public static MovementState[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static MovementState valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null