Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Eraclys authored Sep 3, 2018
1 parent e53e4ac commit afe89e6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit afe89e6

Please sign in to comment.