Class AIBrain.Patrol
java.lang.Object
com.codename1.gaming.platformer.AIBrain.Patrol
- All Implemented Interfaces:
AIBrain.Action
- Enclosing class:
AIBrain
Walks back and forth, turning at walls and, if
turnAtLedges, at drops.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintact(AIBrain brain, Actor self, PlatformWorld world) Computes this tick's buttons.
-
Constructor Details
-
Patrol
public Patrol()A patrol that turns at walls and ledges. -
Patrol
public Patrol(boolean turnAtLedges) A patrol.
Parameters
turnAtLedges: whether to turn at a drop instead of walking off it
-
-
Method Details
-
act
Description copied from interface:AIBrain.ActionComputes this tick's buttons.
Parameters
brain: the brain, for its timers and targetself: the actorworld: the world
Returns
Inputbits- Specified by:
actin interfaceAIBrain.Action
-