1681-engine / index / repeat
Function: repeat() ​
ts
function repeat<C>(times, child): BtNode<C>;Defined in: src/ai/behaviorTree.ts:256
Runs its child times times in a row (Infinity: for good), stopping at the first failure. One pass per tick at most, so a child that succeeds at once cannot spin a frame.
Type Parameters ​
| Type Parameter |
|---|
C |
Parameters ​
| Parameter | Type |
|---|---|
times | number |
child | BtNode<C> |
Returns ​
BtNode<C>