FollowPath is a helper Action that combines two other Actions. FollowPath first chooses a movement target using chooseAction, then moves to the target using moveAction. ContextItems constants are expected to be set and used, including PATHGRAPH, PATH_TO_TARGET, TARGET, and MOVE_TO_TARGET. More...
Public Member Functions | |
override void | SetActionContext (ActionContext context) |
SetActionContext is used to pass a reference to a shared action context. An Action should ensure that its own current state is set/reset based on the new action context. An Action should also usually call SetActionContext on any child actions. | |
override ActionResult | Start (Agent agent, float deltaTime) |
Start is called by an Action Executor one time prior to calling consecutive Execute calls. | |
override ActionResult | Execute (Agent agent, float deltaTime) |
Execute is called by an Action Executor to perform the work of the Action. An Action can run to completion, but will typically perform only the work for a single timestep, then continue at the next timestep for long running actions. | |
override ActionResult | Stop (Agent agent, float deltaTime) |
Stop is called to support cleanup and termination of execution activites. Stop should always be called by the Action Executor after a Start, regardless of the SUCCESS or FAILURE of any Execute calls. | |
Public Attributes | |
const string | ACTION_NAME = "FollowPath" |
Action.Action | chooseAction |
The Action to use for determining a ContextItems.MOVE_TO_TARGET. | |
Action.Action | moveAction |
The Action to use for moving to the ContextItems.MOVE_TO_TARGET. |
FollowPath is a helper Action that combines two other Actions. FollowPath first chooses a movement target using chooseAction, then moves to the target using moveAction. ContextItems constants are expected to be set and used, including PATHGRAPH, PATH_TO_TARGET, TARGET, and MOVE_TO_TARGET.
override ActionResult RAIN.Path.FollowPath.Execute | ( | Agent | agent, |
float | deltaTime | ||
) | [virtual] |
Execute is called by an Action Executor to perform the work of the Action. An Action can run to completion, but will typically perform only the work for a single timestep, then continue at the next timestep for long running actions.
agent | The AI agent owning this action |
deltaTime | timestep in seconds |
Reimplemented from RAIN.Action.Action.
override void RAIN.Path.FollowPath.SetActionContext | ( | ActionContext | context | ) | [virtual] |
SetActionContext is used to pass a reference to a shared action context. An Action should ensure that its own current state is set/reset based on the new action context. An Action should also usually call SetActionContext on any child actions.
context |
Reimplemented from RAIN.Action.Action.
override ActionResult RAIN.Path.FollowPath.Start | ( | Agent | agent, |
float | deltaTime | ||
) | [virtual] |
Start is called by an Action Executor one time prior to calling consecutive Execute calls.
agent | The AI agent owning this action |
deltaTime | timestep in seconds |
Reimplemented from RAIN.Action.Action.
override ActionResult RAIN.Path.FollowPath.Stop | ( | Agent | agent, |
float | deltaTime | ||
) | [virtual] |
Stop is called to support cleanup and termination of execution activites. Stop should always be called by the Action Executor after a Start, regardless of the SUCCESS or FAILURE of any Execute calls.
agent | The AI agent owning this action |
deltaTime | timestep in seconds |
Reimplemented from RAIN.Action.Action.
The Action to use for determining a ContextItems.MOVE_TO_TARGET.
The Action to use for moving to the ContextItems.MOVE_TO_TARGET.