File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,9 @@ with units who attempt to capture the flag while grabbing power ups to try and g
148148 - [ Inverter] ( #inverter )
149149 - [ ReturnSuccess] ( #returnsuccess )
150150 - [ ReturnFailure] ( #returnfailure )
151+ - [ RepeatForever] ( #repeatforever )
152+ - [ RepeatUntilFailure] ( #repeatuntilfailure )
153+ - [ RepeatUntilSuccess] ( #repeatuntilsuccess )
151154 * [ Creating Reusable Behavior Trees] ( #creating-reusable-behavior-trees )
152155 * [ Creating Custom Reusable Nodes] ( #creating-custom-reusable-nodes )
153156 + [ Your First Custom Node and Tree] ( #your-first-custom-node-and-extension )
@@ -356,6 +359,43 @@ Does not change `TaskStatus.Continue`.
356359.End ()
357360```
358361
362+ #### RepeatForever
363+
364+ Return ` TaskStatus.Continue ` regardless of what status the child returns. This decorator (and all descendent
365+ tasks) can be interrupted by calling ` BehaviorTree.Reset() ` .
366+
367+ ``` C#
368+ .Sequence ()
369+ .RepeatForever ()
370+ .Do (() => { return TaskStatus .Success ; })
371+ .End ()
372+ .End ()
373+ ```
374+
375+ #### RepeatUntilFailure
376+
377+ Return ` TaskStatus.Failure ` if the child returns ` TaskStatus.Failure ` , otherwise it returns ` TaskStatus.Continue ` .
378+
379+ ``` C#
380+ .Sequence ()
381+ .RepeatUntilFailure ()
382+ .Do (() => { return TaskStatus .Success ; })
383+ .End ()
384+ .End ()
385+ ```
386+
387+ #### RepeatUntilSuccess
388+
389+ Return ` TaskStatus.Success ` if the child returns ` TaskStatus.Success ` , otherwise it returns ` TaskStatus.Continue ` .
390+
391+ ``` C#
392+ .Sequence ()
393+ .RepeatUntilSuccess ()
394+ .Do (() => { return TaskStatus .Success ; })
395+ .End ()
396+ .End ()
397+ ```
398+
359399## Creating Reusable Behavior Trees
360400
361401Trees can be combined with just a few line of code. This allows you to create injectable behavior trees that bundles different
You can’t perform that action at this time.
0 commit comments