Warning: preg_replace(): Compilation failed: invalid range in character class at offset 4 in /home/customer/www/qualgame.com/public_html/wp-content/plugins/crayon-syntax-highlighter/crayon_langs.class.php on line 340
Condition Node | BtEngineSDK

Condition Node

ConditionNode
Hierarchy:
Namespace BehaviorTreeEngine
Parent class TreeNonRootNode
Description:
Condition Node represents a type of Leaf Node that is used to test some property of the game. The ConditionNode class is a MonoBehaviorNodeBase and performs the corresponding responses of a Condition Node instance from the behavior tree engine on the Unity engine side. The ConditionNode class inherits some virtual functions of OnTest, OnConstruct, OnDestruct, OnReset, OnPause and OnStop for a derived class, i.e., NewConditionNode, 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.
OnTest A node operation that is invoked when executing the Condition 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, OnStep.
ConditionNode.nodeType
Signature:
MonoBehaviorNodeType ConditionNode.nodeType
Description:
The node type of this mono behavior node, which is always MonoBehaviorNodeType.Condition.
ConditionNode.OnTest
Signature:
Tuple<bool, NodeStatus> ConditionNode.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.
ConditionNode.OnConstruct
Signature:
void ConditionNode.OnConstruct()
Description:
A node operation that is invoked when loading the tree. Override this method in a derived class of ConditionNode.
ConditionNode.OnDestruct 
Signature:
void ConditionNode.OnDestruct()
Description:
A node operation that is invoked when destroying the tree. Override this method in a derived class of ConditionNode.
ConditionNode.OnReset
Signature:
void ConditionNode.OnReset()
Description:
A node operation that is invoked when resetting the tree. Override this method in a derived class of ConditionNode.
ConditionNode.OnPause
Signature:
void ConditionNode.OnPause()
Description:
A node operation that is invoked when pausing the tree. Override this method in a derived class of ConditionNode.
ConditionNode.OnStop
Signature:
void ConditionNode.OnStop()
Description:
A node operation that is invoked when stopping the tree. Override this method in a derived class of ConditionNode.