diff --git a/README.md b/README.md index 2317f42..5266f75 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,26 @@ builder.Selector("my-selector") .End() ``` +#### RandomSequence +``` cs +builder.RandomSequence("my-random-sequence") + .Do("action1", context => BehaviourStatus.Succeeded) + .Do("action2", context => BehaviourStatus.Succeeded) + .Do("action3", context => BehaviourStatus.Succeeded) + ... +.End() +``` + +#### RandomSelector +``` cs +builder.RandomSelector("my-random-selector") + .Do("action1", context => BehaviourStatus.Failed) + .Do("action2", context => BehaviourStatus.Succeeded) + .Do("action3", context => BehaviourStatus.Succeeded) + ... +.End() +``` + #### PrioritySequence ``` cs builder.PrioritySequence("my-priority-sequence") @@ -183,6 +203,13 @@ builder.UntilFailed("my-until-failed") .End() ``` +#### Random +``` cs +builder.Random("my-random", 0.6) // will call child 60% of the time + .Do("action1", context => BehaviourStatus.Succeeded) +.End() +``` + #### SubTree ``` cs builder.SubTree("my-sub-tree", otherBehaviourTree)