10 auto behaviorTree = std::make_shared<BehaviorTree>(name);
12 behaviorTree->SetRootNode(root);
15 auto adapter = std::make_shared<DirectTreeAdapter>(behaviorTree);
25 std::unique_ptr<Node> node;
26 switch (concrete_type) {
45 auto adapter = std::make_shared<NodeAdapter>(node.get());
56 auto behaviorTree = std::make_shared<BehaviorTree>(
"Sample Tree");
60 auto sharedTree = std::shared_ptr<Node>(sampleTree.release());
61 behaviorTree->SetRootNode(sharedTree);
64 auto adapter = std::make_shared<DirectTreeAdapter>(behaviorTree);
Node::Type ConvertNodeType(ITreeNode::NodeType type) const
std::shared_ptr< ITreeNode > CreateNode(const EmberCore::String &name, ITreeNode::NodeType type) override
Create a new node.
std::shared_ptr< ITreeStructure > CreateTree(const EmberCore::String &name="New Tree") override
Create a new empty behavior tree.
std::shared_ptr< ITreeStructure > CreateSampleTree() override
Create a sample behavior tree for testing.
NodeType
Node types for visualization categorization.
static std::unique_ptr< Node > CreateConditionNode(const String &name)
static std::unique_ptr< Node > CreateSampleTree()
static std::unique_ptr< Node > CreateActionNode(const String &name)
static std::unique_ptr< Node > CreateControlNode(const String &name)
static std::unique_ptr< Node > CreateDecoratorNode(const String &name)
Type
Node types for behavior tree classification.
Main types header for EmberCore.
std::string String
Framework-agnostic string type.