Class AIBrain.Chase

java.lang.Object
com.codename1.gaming.platformer.AIBrain.Chase
All Implemented Interfaces:
AIBrain.Action
Enclosing class:
AIBrain

public static final class AIBrain.Chase extends Object implements AIBrain.Action
Moves toward the player, jumping at walls if jumps.
  • Constructor Details

    • Chase

      public Chase(boolean jumps)

      A chase.

      Parameters
      • jumps: whether to jump when blocked by a wall
  • Method Details

    • act

      public int act(AIBrain brain, Actor self, PlatformWorld world)
      Description copied from interface: AIBrain.Action

      Computes this tick's buttons.

      Parameters
      • brain: the brain, for its timers and target
      • self: the actor
      • world: the world
      Returns

      Input bits

      Specified by:
      act in interface AIBrain.Action