BTConditionNode is a behavior tree leaf node that evaluates a conditional expression to either true or false. A true evaluation will return an ActionResult of SUCCESS. A false evaluation will return an ActionResult of FAILURE. More complex computational evaluations must be coded as BTActionNodes. More...
Public Member Functions | |
BTConditionNode (string nodeName) | |
Constructor. | |
void | SetExpression (string expression) |
Set the conditional expression using parseable text. | |
override ActionResult | Start (Agent agent, float deltaTime) |
Start Action handler. | |
override ActionResult | Execute (Agent agent, float deltaTime) |
Execute causes the ConditionalExpression to be evaluated. The variable context is reset before evaluation based on the VariableContext stored in the actionContext. | |
override Action.Action.ActionResult | Stop (Agent agent, float deltaTime) |
Stop Action handler. | |
Public Attributes | |
const string | NODETYPE = "condition" |
Node type, used in xml parsing. | |
Properties | |
ConditionalExpression | Conditional [get, set] |
BTConditionNode is a behavior tree leaf node that evaluates a conditional expression to either true or false. A true evaluation will return an ActionResult of SUCCESS. A false evaluation will return an ActionResult of FAILURE. More complex computational evaluations must be coded as BTActionNodes.
RAIN.BehaviorTrees.BTConditionNode.BTConditionNode | ( | string | nodeName | ) |
Constructor.
nodeName | The name of the node to create |
override ActionResult RAIN.BehaviorTrees.BTConditionNode.Execute | ( | Agent | agent, |
float | deltaTime | ||
) | [virtual] |
Execute causes the ConditionalExpression to be evaluated. The variable context is reset before evaluation based on the VariableContext stored in the actionContext.
agent | AI Agent owner of the behavior tree |
deltaTime | timestep in seconds |
Reimplemented from RAIN.Action.Action.
void RAIN.BehaviorTrees.BTConditionNode.SetExpression | ( | string | expression | ) |
Set the conditional expression using parseable text.
expression | The text expression to parse. See Belief.ConditionalExpressionParser. |
override ActionResult RAIN.BehaviorTrees.BTConditionNode.Start | ( | Agent | agent, |
float | deltaTime | ||
) | [virtual] |
Start Action handler.
agent | AI Agent owner of the behavior tree |
deltaTime | timestep in seconds |
Reimplemented from RAIN.Action.Action.
override Action.Action.ActionResult RAIN.BehaviorTrees.BTConditionNode.Stop | ( | Agent | agent, |
float | deltaTime | ||
) | [virtual] |
Stop Action handler.
agent | AI Agent owner of the behavior tree |
deltaTime | timestep in seconds |
Reimplemented from RAIN.Action.Action.
const string RAIN.BehaviorTrees.BTConditionNode.NODETYPE = "condition" |
Node type, used in xml parsing.