Class AIBrain.Hop

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

public static final class AIBrain.Hop extends Object implements AIBrain.Action
Patrols and hops every interval ticks.
  • Constructor Details

    • Hop

      public Hop(int interval)

      A hopping patrol.

      Parameters
      • interval: ticks between hops
  • 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