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 interface AIBrain.Action

Known subtypesAIBrain.Both, AIBrain.Chase, AIBrain.Hop, AIBrain.Idle, AIBrain.Patrol, AIBrain.Shoot

Produces input for one tick.

Methods

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

Method details

act

public abstract 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