Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion docs/tutorial_05_subtrees.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@ It is also the first practical example that uses `Decorators` and `Fallback`.
</root>
```

It may be noticed that we incapsulated a quite complex branch of the tree,
For readability, our custom nodes are registered with the one-liner:

`CrossDoor::RegisterNodes(factory);`

Default nodes provided by the BT library such as `Fallback` are already registered by
the BehaviorTreeFactory.

It may be noticed that we encapsulated a quite complex branch of the tree,
the one to execute when the door is closed, into a separate tree called
`DoorClosed`.

Expand Down
4 changes: 3 additions & 1 deletion examples/t05_crossdoor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ int main(int argc, char** argv)
{
BT::BehaviorTreeFactory factory;

// register all the actions into the factory
// Register our custom nodes into the factory.
// Any default nodes provided by the BT library (such as Fallback) are registered by
// default in the BehaviorTreeFactory.
CrossDoor::RegisterNodes(factory);

// Important: when the object tree goes out of scope, all the TreeNodes are destroyed
Expand Down