Flow node that always repeats running child node.
More...
Inherits lab.AFlowNode.
Flow node that always repeats running child node.
Another AFlowNode that has only one child. RepeaterNode repeats invoking child node and at the end always returns true as the result of run.
override bool lab.RepeaterNode.AddNode |
( |
ANode |
node | ) |
|
|
virtual |
Adds new node as child. There can be only one child for RepeaterNode, so child will be overriden.
- Parameters
-
node | Node to be added as a child. |
- Returns
- Always returns true.
Implements lab.AFlowNode.
override bool lab.RepeaterNode.DebugRun |
( |
AiBlackboard |
parameters, |
|
|
IList< AiTree > |
trees, |
|
|
int |
level, |
|
|
int |
nodeIndex |
|
) |
| |
|
virtual |
Runs debug this node.
- Parameters
-
parameters | AiBlackboard with global parameters. |
trees | Readonly list with all ai trees. |
level | Level of how deep we are in this AiTree. |
nodeIndex | Index of current node in parent's node. If this is root, nodeIndex is 0. |
- Returns
- Always returns true.
Implements lab.ANode.
override ANode lab.RepeaterNode.GetNode |
( |
int |
i | ) |
|
|
virtual |
Gets child node.
- Parameters
-
i | Index of child node to get. RepeaterNode has one child node, so only 0 will work. |
- Returns
- Child node if i was 0 and child node was attached. Otherwise null.
Implements lab.AFlowNode.
override bool lab.RepeaterNode.RemoveNode |
( |
ANode |
node | ) |
|
|
virtual |
Removes child node.
- Parameters
-
node | Child node to be removed. |
- Returns
- True if provided node to remove is the current child node. Otherwise false.
Implements lab.AFlowNode.
Runs this node.
- Parameters
-
parameters | AiBlackboard with global parameters. |
trees | Readonly list with all ai trees. |
tasks | List of task scripts to bind with task nodes. |
- Returns
- Always returns true.
Implements lab.ANode.
override int lab.RepeaterNode.NodeCount |
|
get |
Gets count of child nodes. RepeaterNode can give only two values, 0 or 1.
int lab.RepeaterNode.Repeat |
|
getset |
Gets/Sets number of repeats.
The documentation for this class was generated from the following file:
- lab/Assets/lab/Scripts/Nodes/Flow Nodes/RepeaterNode.cs