Patrol

Merlins Beard . Actions . Patrol

Methods

Initialize ( Brain :: Brain )

Retrieves and stores the Mover and Waypoint Path components on the Brain. Starts the character moving toward the first waypoint in the path.

Restart ( )

Sets the maximum speed of the Mover to a Walk and calls Go To on the Mover using the current Waypoint.

Execute ( )

Patrol checks if the Mover has reached its destination. When it does and if the Waypoint has an Action set, then it calls Set Action on the Brain and sets the next Waypoint to be the current Waypoint. Go To Waypoint is not called until Restart is called by the Brain.

If no Action is set Patrol sets the current Waypoint to the next Waypoint and calls Go To Waypoint.

Cancel ( )

Default behavior.