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.Both
- Object
- AIBrain.Both
ImplementsAIBrain.Action
Runs two actions and combines their buttons, such as a patrol that shoots.
Constructors
public Both(AIBrain.Action a, AIBrain.Action b) | A combined action. |
Methods
public int act(AIBrain brain, Actor self, PlatformWorld world) | Computes this tick’s buttons. |
Inherited methods
Constructor details
Both
public Both(AIBrain.Action a, AIBrain.Action b)A combined action.
Parameters
aAIBrain.Action- the first action
bAIBrain.Action- the second action
Method details
act
public int act(AIBrain brain, Actor self, PlatformWorld world)Computes this tick’s buttons.
Parameters
brainAIBrain- the brain, for its timers and target
selfActor- the actor
worldPlatformWorld- the world
Returns
Input bits