TreeNonRootNode | |
Hierarchy: | |
Namespace | BehaviorTreeEngine |
Parent class | MonoBehaviorNodeBase |
Description: | |
Tree Non Root Node represents an abstract parent node of Decorator Node, Condition Node and Action Node. The TreeNonRootNode class is a MonoBehaviorNodeBase and defines some common properties of its child nodes. The TreeNonRootNode class inherits some virtual functions of OnExecute, OnReport, OnTest, OnStep, OnConstruct, OnDestruct, OnReset, OnPause and OnStop for a derived class of DecoratorNode, ConditionNode or ActionNode to override. | |
Inherited Variables: | |
nodeType | The node type of this mono behavior node. |
forestIndex | The forest index of this mono behavior node. |
treeIndex | The tree index of this mono behavior node. |
nodeIndex | The node index of this mono behavior node. |
forestName | The forest name of this mono behavior node. |
treeName | The tree name of this mono behavior node. |
nodeName | The node name of this mono behavior node. |
Inherited Functions: | |
Init | Initialize the properties of this mono behavior node. |
OnExecute | A node operation that is invoked when executing the Decorator Node, or when the OnReport operation returned a node status of Executing. |
OnReport | A node operation that is invoked when the Decorator Node was reported a node status of Success or Failure from its child node, or when the OnExecute operation returned a node status of Failure. |
OnTest | A node operation that is invoked when executing the Condition Node. |
OnStep | A node operation that is invoked when executing the Action Node. |
OnConstruct | A node operation that is invoked when loading the tree. |
OnDestruct | A node operation that is invoked when destroying the tree. |
OnReset | A node operation that is invoked when resetting the tree. |
OnPause | A node operation that is invoked when pausing the tree. |
OnStop | A node operation that is invoked when stopping the tree. |
Deprecated Functions: | |
OnExecute, OnReport, OnNotify. | |
TreeNonRootNode.nodeType | |
Signature: | |
MonoBehaviorNodeType TreeNonRootNode.nodeType | |
Description: | |
The node type of this mono behavior node, which is always MonoBehaviorNodeType.TreeNonRoot. | |
TreeNonRootNode.forestIndex | |
Signature: | |
uint TreeNonRootNode.forestIndex | |
Description: | |
The forest index of this mono behavior node. | |
TreeNonRootNode.treeIndex | |
Signature: | |
uint TreeNonRootNode.treeIndex | |
Description: | |
The tree index of this mono behavior node. | |
TreeNonRootNode.nodeIndex | |
Signature: | |
uint TreeNonRootNode.nodeIndex | |
Description: | |
The node index of this mono behavior node. | |
TreeNonRootNode.forestName | |
Signature: | |
string TreeNonRootNode.forestName | |
Description: | |
The forest name of this mono behavior node. | |
TreeNonRootNode.treeName | |
Signature: | |
string TreeNonRootNode.treeName | |
Description: | |
The tree name of this mono behavior node. | |
TreeNonRootNode.nodeName | |
Signature: | |
uint TreeNonRootNode.nodeName | |
Description: | |
The node name of this mono behavior node. | |
TreeNonRootNode.Init | |
Signature: | |
void TreeNonRootNode.Init(uint ForestIndex, uint TreeIndex, uint NodeIndex, string ForestName, string TreeName, string NodeName) void TreeNonRootNode.Init(uint ForestIndex, uint TreeIndex, uint NodeIndex, string TreeName, string NodeName) void TreeNonRootNode.Init(uint ForestIndex, uint TreeIndex, uint NodeIndex, string NodeName) |
|
Description: | |
Initializes the properties of this mono behavior node. | |
Parameters: | |
ForestIndex | The forest index of this mono behavior node. |
TreeIndex | The tree index of this mono behavior node. |
NodeIndex | The node index of this mono behavior node. |
ForestName | The forest name of this mono behavior node. |
TreeName | The tree name of this mono behavior node. |
NodeName | The node name of this mono behavior node. |
TreeNonRootNode.OnExecute | |
Signature: | |
Tuple<bool, NodeStatus> TreeNonRootNode.OnExecute() | |
Description: | |
A node operation that is invoked when executing the Decorator Node, or when the OnReport operation returned a node status of Executing. This operation is getting invoked every frame repeatedly until returning a true as Item1. When this operation had done repeat, i.e., Item1 was true, if a node status of Success was returned as Item2, the Decorator Node continues to execute its child node. If a node status of Failure was returned, the Decorator Node reports a node status of Failure to itself by invoking its OnReport operation with a node status of Failure. If a node status of Executing was returned, the Decorator Node notifies executing to the lowest parent Parallel Node if it is in a Parallel Node child sub-tree and all the way up to the Tree Root Node, otherwise, to the Tree Root Node directly, to request one more execution and get invoked again. Override this method in a derived class of DecoratorNode. | |
Return Value: | |
A tuple. Item1: true when this operation has done repeat; false otherwise. Item2: a node status to determine the next branch of execution flow for the Decorator Node. Null: continues the repeat. | |
TreeNonRootNode.OnReport | |
Signature: | |
NodeStatus TreeNonRootNode.OnReport(NodeStatus Status) | |
Description: | |
A node operation that is invoked when the Decorator Node was reported a node status of Success or Failure from its child node, or when the OnExecute operation returned a node status of Failure. If a node status of Success or Failure was returned, the Decorator Node reports the result node status to its parent node. If a node status of Executing was returned, the Decorator Node continues to execute itself by invoking its OnExecute operation. Override this method in a derived class of DecoratorNode. | |
Parameters: | |
Status | The result node status (can be either a Success or a Failure) that was reported from its child node. |
Return Value: | |
A node status to determine the next branch of execution flow for the Decorator Node. | |
TreeNonRootNode.OnTest | |
Signature: | |
Tuple<bool, NodeStatus> TreeNonRootNode.OnTest() | |
Description: | |
A node operation that is invoked when executing the Condition Node. This operation is getting invoked every frame repeatedly until returning a true as Item1. When this operation had done repeat, i.e., Item1 was true, if a node status of Success or Failure was returned as Item2, the Condition Node reports the result node status to its parent node. If a node status of Executing was returned, the Condition Node notifies executing to the lowest parent Parallel Node if it is in a Parallel Node child sub-tree and all the way up to the Tree Root Node, otherwise, to the Tree Root Node directly, to request one more execution and get invoked again. Override this method in a derived class of ConditionNode. | |
Return Value: | |
A tuple. Item1: true when this operation has done repeat; false otherwise. Item2: a node status to indicate the test result of the Condition Node. Null: continues the repeat. | |
TreeNonRootNode.OnStep | |
Signature: | |
bool TreeNonRootNode.OnStep() | |
Description: | |
A node operation that is invoked when executing the Action Node. This operation is getting invoked every frame repeatedly until returning a true. Based on the action node policy, the OnStep operation of the Action Node always reports a fixed node status of either Success or Failure after performing the node task to its parent node. Override this method in a derived class of ActionNode. | |
TreeNonRootNode.OnConstruct | |
Signature: | |
void TreeNonRootNode.OnConstruct() | |
Description: | |
A node operation that is invoked when loading the tree. Override this method in a derived class of DecoratorNode, ConditionNode or ActionNode. | |
TreeNonRootNode.OnDestruct | |
Signature: | |
void TreeNonRootNode.OnDestruct() | |
Description: | |
A node operation that is invoked when destroying the tree. Override this method in a derived class of DecoratorNode, ConditionNode or ActionNode. | |
TreeNonRootNode.OnReset | |
Signature: | |
void TreeNonRootNode.OnReset() | |
Description: | |
A node operation that is invoked when resetting the tree. Override this method in a derived class of DecoratorNode, ConditionNode or ActionNode. | |
TreeNonRootNode.OnPause | |
Signature: | |
void TreeNonRootNode.OnPause() | |
Description: | |
A node operation that is invoked when pausing the tree. Override this method in a derived class of DecoratorNode, ConditionNode or ActionNode. | |
TreeNonRootNode.OnStop | |
Signature: | |
void TreeNonRootNode.OnStop() | |
Description: | |
A node operation that is invoked when stopping the tree. Override this method in a derived class of DecoratorNode, ConditionNode or ActionNode. |
Copyright © 2016-2020 Qualgame, LLC