SequentialActionExecutor is a basic executor that executes contained Actions in sequence, waiting for each Action to complete successfully before beginning the next Action. More...
Classes | |
| class | TimeBundle |
Public Member Functions | |
| SequentialActionExecutor () | |
| Default constructor. | |
| override ActionResult | Start (Agent agent, float deltaTime) |
| Implementation of Action.Start() Performs initialization. | |
| override ActionResult | Execute (Agent agent, float deltaTime) |
| Implementation of Action.Execute() Each Action must complete with a result of SUCCESS before the next Action is started. If any Action fails, execution fails. | |
| override Action.ActionResult | Stop (Agent agent, float deltaTime) |
| Implementation of Action.Stop() Performs cleanup. | |
| void | RemovePending (string actionName, bool removeAll) |
| Remove any Actions matching actionName that have not yet started execution. | |
| void | RemoveCurrent (string actionName, bool removeAll) |
| Remove any Actions matching actionName that are executing. | |
| void | RemoveCompleted (string actionName, bool removeAll) |
| Remove any Actions matching actionName that have completed execution. | |
| void | Reset (Agent actor) |
| Reset will clear all Actions and reset the ActionContext. | |
| void | Reset (Agent actor, ActionContext context) |
| Reset will clear all Actions and set the ActionContext to the given context. | |
| override void | SetActionContext (ActionContext context) |
| SetActionContext removes all completed Actions, sets the internal ActionContext, resets the ActionContext for any pending actions, then unpauses execution. | |
| void | AddAction (Action action, float delay) |
| Add an action to the pending list of Actions to execute. A delay can be included specifying a time delay between activation/selection of an action and when it can be executed. | |
| void | InsertAction (Action action, int sequence) |
| Insert an action at the specified position into the pending list of Actions to execute. A delay can be included specifying a time delay between activation/selection of an action and when it can be executed. | |
| void | RemoveAction (string actionName) |
| Remove an action from the ActionExecutor. This will cause the Action to be Stopped and unloaded if it is currently executing. | |
| void | Pause () |
| Pause will pause execution until Unpause is called or the ActionContext is reset. | |
| void | Unpause (float delay) |
| Unpause will cause execution to resume after a Pause call. Execution can be delayed by passing in a positive number value for delay. | |
| void | Clear () |
| Clear will reset to initial state, clearing all Actions from pending, current, and completed. | |
SequentialActionExecutor is a basic executor that executes contained Actions in sequence, waiting for each Action to complete successfully before beginning the next Action.
| RAIN.Action.SequentialActionExecutor.SequentialActionExecutor | ( | ) |
Default constructor.
| void RAIN.Action.SequentialActionExecutor.AddAction | ( | Action | action, |
| float | delay | ||
| ) |
Add an action to the pending list of Actions to execute. A delay can be included specifying a time delay between activation/selection of an action and when it can be executed.
| action | An Action to add |
| delay | A time delay in seconds to wait for before allowing execution of the Action |
Implements RAIN.Action.IActionExecutor.
| void RAIN.Action.SequentialActionExecutor.Clear | ( | ) |
Clear will reset to initial state, clearing all Actions from pending, current, and completed.
Implements RAIN.Action.IActionExecutor.
| override ActionResult RAIN.Action.SequentialActionExecutor.Execute | ( | Agent | agent, |
| float | deltaTime | ||
| ) | [virtual] |
Implementation of Action.Execute() Each Action must complete with a result of SUCCESS before the next Action is started. If any Action fails, execution fails.
| agent | The AI Agent owning this executor |
| deltaTime | timestep in seconds |
Reimplemented from RAIN.Action.Action.
| void RAIN.Action.SequentialActionExecutor.InsertAction | ( | Action | action, |
| int | sequence | ||
| ) |
Insert an action at the specified position into the pending list of Actions to execute. A delay can be included specifying a time delay between activation/selection of an action and when it can be executed.
| action | An Action to insert |
| delay | A time delay in seconds to wait for before allowing execution of the Action |
Implements RAIN.Action.IActionExecutor.
| void RAIN.Action.SequentialActionExecutor.Pause | ( | ) |
Pause will pause execution until Unpause is called or the ActionContext is reset.
Implements RAIN.Action.IActionExecutor.
| void RAIN.Action.SequentialActionExecutor.RemoveAction | ( | string | actionName | ) |
Remove an action from the ActionExecutor. This will cause the Action to be Stopped and unloaded if it is currently executing.
| actionName | The name of the Action to remove. If more than one Action is loaded with a matching name, all matches will be removed. |
Implements RAIN.Action.IActionExecutor.
| void RAIN.Action.SequentialActionExecutor.RemoveCompleted | ( | string | actionName, |
| bool | removeAll | ||
| ) |
Remove any Actions matching actionName that have completed execution.
| actionName | The AI Agent owning this executor |
| removeAll | If true, remove all matching Actions, If false, remove only the first match |
| void RAIN.Action.SequentialActionExecutor.RemoveCurrent | ( | string | actionName, |
| bool | removeAll | ||
| ) |
Remove any Actions matching actionName that are executing.
| actionName | The AI Agent owning this executor |
| removeAll | If true, remove all matching Actions, If false, remove only the first match |
| void RAIN.Action.SequentialActionExecutor.RemovePending | ( | string | actionName, |
| bool | removeAll | ||
| ) |
Remove any Actions matching actionName that have not yet started execution.
| actionName | The AI Agent owning this executor |
| removeAll | If true, remove all matching Actions, If false, remove only the first match |
| void RAIN.Action.SequentialActionExecutor.Reset | ( | Agent | actor, |
| ActionContext | context | ||
| ) |
Reset will clear all Actions and set the ActionContext to the given context.
| actor | The AI Agent owning this executor |
| context | The context to use after clearing Actions |
Implements RAIN.Action.IActionExecutor.
| void RAIN.Action.SequentialActionExecutor.Reset | ( | Agent | actor | ) |
Reset will clear all Actions and reset the ActionContext.
| actor | The AI Agent owning this executor |
Implements RAIN.Action.IActionExecutor.
| override void RAIN.Action.SequentialActionExecutor.SetActionContext | ( | ActionContext | context | ) | [virtual] |
SetActionContext removes all completed Actions, sets the internal ActionContext, resets the ActionContext for any pending actions, then unpauses execution.
| context | The ActionContext to set |
Reimplemented from RAIN.Action.Action.
| override ActionResult RAIN.Action.SequentialActionExecutor.Start | ( | Agent | agent, |
| float | deltaTime | ||
| ) | [virtual] |
Implementation of Action.Start() Performs initialization.
| agent | The AI Agent owning this executor |
| deltaTime | timestep in seconds |
Reimplemented from RAIN.Action.Action.
| override Action.ActionResult RAIN.Action.SequentialActionExecutor.Stop | ( | Agent | agent, |
| float | deltaTime | ||
| ) | [virtual] |
Implementation of Action.Stop() Performs cleanup.
| agent | The AI Agent owning this executor |
| deltaTime | timestep in seconds |
Reimplemented from RAIN.Action.Action.
| void RAIN.Action.SequentialActionExecutor.Unpause | ( | float | delay | ) |
Unpause will cause execution to resume after a Pause call. Execution can be delayed by passing in a positive number value for delay.
| delay | The amount of time to wait before resuming execution. |
Implements RAIN.Action.IActionExecutor.