You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-2Lines changed: 15 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,10 +124,11 @@ public class ExampleUsage : MonoBehaviour {
124
124
-[Wait Time](#wait-time)
125
125
+[Conditions](#conditions)
126
126
-[Generic](#condition-generic)
127
-
-[Random Chance](#random-chance)
127
+
-[RandomChance](#random-chance)
128
128
+[Composites](#composites)
129
129
-[Sequence](#sequence)
130
130
-[Selector](#selector)
131
+
-[SelectorRandom](#selector-random)
131
132
-[Parallel](#parallel)
132
133
+[Decorators](#decorators)
133
134
-[Generic](#decorator-generic)
@@ -209,7 +210,7 @@ look into the section on writing your own custom conditions.
209
210
.End()
210
211
```
211
212
212
-
#### Random Chance
213
+
#### RandomChance
213
214
214
215
Randomly evaluate a node as true or false based upon the passed chance.
215
216
@@ -259,6 +260,18 @@ Runs each child node until *Success* is returned.
259
260
.End()
260
261
```
261
262
263
+
#### SelectorRandom
264
+
265
+
Randomly selects a child node with a shuffle algorithm. Looks until `Success` is returned or every node fails. Shuffles every time the tree initially start running it.
266
+
267
+
```C#
268
+
.SelectorRandom()
269
+
.Do(() => { returnTaskStatus.Failure; })
270
+
.Do(() => { returnTaskStatus.Success; })
271
+
.Do(() => { returnTaskStatus.Failure; })
272
+
.End()
273
+
```
274
+
262
275
#### Parallel
263
276
264
277
Runs all child nodes at the same time until they all return *Success*. Exits and stops all running nodes if ANY of them return *Failure*.
0 commit comments