lab  2016-03-28
lightweight ai behaviour trees framework for Unity 3D
lab.BoolParameterNode Class Reference

Parameter node that provides possibility for comparing AiBlackboard's bool values. More...

Inherits lab.AParameterNode< bool >.

Public Types

enum  BoolCondition { Equal, NotEqual }
 Enumeration for bool parameters of possible conditions to choose to compare two values. More...
 

Public Member Functions

override bool Run (AiBlackboard parameters, IList< AiTree > trees, List< ATaskScript > tasks)
 Runs this node. More...
 
override bool DebugRun (AiBlackboard parameters, IList< AiTree > trees, int level, int nodeIndex)
 Runs debug this node. More...
 

Properties

BoolCondition Condition [get, set]
 Sets/Gets condition to compare two bool values. More...
 
- Properties inherited from lab.AParameterNode< bool >
string Key [get, set]
 Gets/Sets key of parameter in AiBlackboard. More...
 
Value [get, set]
 Gets/Sets static value to compare to global information in AiBlackboard. More...
 
bool DynamicValue [get, set]
 Gets/Sets a flag to compare to static or dynamic (another blackboard's value) parameter. More...
 
string DynamicValueKey [get, set]
 Gets/Sets key of parameter to compare to. More...
 

Detailed Description

Parameter node that provides possibility for comparing AiBlackboard's bool values.

BoolParameterNode can check if two values are equal or not equal to each other.

Member Enumeration Documentation

Enumeration for bool parameters of possible conditions to choose to compare two values.

Member Function Documentation

override bool lab.BoolParameterNode.DebugRun ( AiBlackboard  parameters,
IList< AiTree trees,
int  level,
int  nodeIndex 
)

Runs debug this node.

Parameters
parametersAiBlackboard with global parameters.
treesReadonly list with all ai trees.
levelLevel of how deep we are in this AiTree.
nodeIndexIndex of current node in parent's node. If this is root, nodeIndex is 0.
Returns
True if current conditions of comparition succeed. Otherwise false.
override bool lab.BoolParameterNode.Run ( AiBlackboard  parameters,
IList< AiTree trees,
List< ATaskScript tasks 
)

Runs this node.

Parameters
parametersAiBlackboard with global parameters.
treesReadonly list with all ai trees.
tasksList of task scripts to bind with.
Returns
True if current conditions of comparition succeed. Otherwise false.

Property Documentation

BoolCondition lab.BoolParameterNode.Condition
getset

Sets/Gets condition to compare two bool values.


The documentation for this class was generated from the following file: