C# Class lab.AiTree

Afficher le fichier Open project: marekdaniluk/lab Class Usage Examples

Méthodes publiques

Méthode Description
AddNode ( ANode node ) : bool

Adds new node to this AiTree.

ConnectNodes ( AFlowNode from, ANode to ) : bool

Creates connection between one node to another. The connection is one one-way and tries to prevent circular to prevent infinity loops.

DebugRun ( AiBlackboard parameters, IList trees, int level ) : bool

Runs debug this tree behaviour.

RemoveNode ( ANode node ) : bool

Removes node from this AiTree. Also removes all connections between other nodes, so it doesn't have to be done manually.

Run ( AiBlackboard parameters, IList trees, List tasks ) : bool

Runs this tree behaviour.

Private Methods

Méthode Description
IsConnected ( AFlowNode from, AFlowNode to ) : bool

Method Details

AddNode() public méthode

Adds new node to this AiTree.
public AddNode ( ANode node ) : bool
node ANode A node to add to this AiTree.
Résultat bool

ConnectNodes() public méthode

Creates connection between one node to another. The connection is one one-way and tries to prevent circular to prevent infinity loops.
public ConnectNodes ( AFlowNode from, ANode to ) : bool
from AFlowNode A node that is higher in hierarchy.
to ANode A node that is lower in hierarchy.
Résultat bool

DebugRun() public méthode

Runs debug this tree behaviour.
public DebugRun ( AiBlackboard parameters, IList trees, int level ) : bool
parameters AiBlackboard AiBlackboard with global parameters.
trees IList Readonly list with all ai trees.
level int Level of how deep we are in this AiTree.
Résultat bool

RemoveNode() public méthode

Removes node from this AiTree. Also removes all connections between other nodes, so it doesn't have to be done manually.
public RemoveNode ( ANode node ) : bool
node ANode A node to remove from this AiTree.
Résultat bool

Run() public méthode

Runs this tree behaviour.
public Run ( AiBlackboard parameters, IList trees, List tasks ) : bool
parameters AiBlackboard AiBlackboard with global parameters.
trees IList Readonly list with all ai trees.
tasks List List of task scripts to bind with task nodes.
Résultat bool