Skip to content

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 ​

ParameterType
timesnumber
childBtNode<C>

Returns ​

BtNode<C>

Released under the MIT License.