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 static final class AIBrain.Hop

  1. Object
  2. AIBrain.Hop

ImplementsAIBrain.Action

Patrols and hops every interval ticks.

Constructors

public Hop(int interval)A hopping patrol.

Methods

public int act(AIBrain brain, Actor self, PlatformWorld world)Computes this tick’s buttons.

Inherited methods

Constructor details

Hop

public Hop(int interval)
A hopping patrol.

Parameters

interval int
ticks between hops

Method details

act

public int act(AIBrain brain, Actor self, PlatformWorld world)
Computes this tick’s buttons.

Parameters

brain AIBrain
the brain, for its timers and target
self Actor
the actor
world PlatformWorld
the world

Returns

Input bits