C# Класс lab.AiTree

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
IsConnected ( AFlowNode from, AFlowNode to ) : bool

Описание методов

AddNode() публичный Метод

Adds new node to this AiTree.
public AddNode ( ANode node ) : bool
node ANode A node to add to this AiTree.
Результат bool

ConnectNodes() публичный Метод

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.
Результат bool

DebugRun() публичный Метод

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.
Результат bool

RemoveNode() публичный Метод

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.
Результат bool

Run() публичный Метод

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.
Результат bool