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

Node responsible for running binded task script. More...

Inherits lab.ANode.

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

int TaskIndex [get, set]
 Sets/Gets index of task from AiController's tasks list to be executed. This is how tasks are binded currently. More...
 
string Description [get, set]
 Sets/Gets description of current task. More...
 

Detailed Description

Node responsible for running binded task script.

ANode represents logic of ai. TaskNodes are bridges between logic and implementation, they execute binded tasks.

Member Function Documentation

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

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
Debug run always returns true for TaskNode.

Implements lab.ANode.

override bool lab.TaskNode.Run ( AiBlackboard  parameters,
IList< AiTree trees,
List< ATaskScript tasks 
)
virtual

Runs this node.

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

Implements lab.ANode.

Property Documentation

string lab.TaskNode.Description
getset

Sets/Gets description of current task.

int lab.TaskNode.TaskIndex
getset

Sets/Gets index of task from AiController's tasks list to be executed. This is how tasks are binded currently.


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