![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Represents a single node in a behavior tree. More...
#include <BehaviorTree.h>
Public Member Functions | |
| std::string | GetParameterString (const std::string &key, const std::string &defaultValue="") const |
| int | GetParameterInt (const std::string &key, int defaultValue=0) const |
| float | GetParameterFloat (const std::string &key, float defaultValue=0.0f) const |
Public Attributes | |
| BTNodeType | type = BTNodeType::Action |
| Node type. | |
| uint32_t | id = 0 |
| Unique node ID within tree. | |
| std::vector< uint32_t > | childIds |
| IDs of child nodes. | |
| BTConditionType | conditionType = BTConditionType::TargetVisible |
| Condition type (enum) | |
| std::string | conditionTypeString |
| Condition type as string (for flexible conditions like CheckBlackboardValue) | |
| float | conditionParam = 0.0f |
| Generic parameter for conditions. | |
| BTActionType | actionType = BTActionType::Idle |
| Action type. | |
| float | actionParam1 = 0.0f |
| Generic parameter 1 for actions. | |
| float | actionParam2 = 0.0f |
| Generic parameter 2 for actions. | |
| uint32_t | decoratorChildId = 0 |
| int | repeatCount = 1 |
| std::string | name |
| float | editorPosX = 0.0f |
| Horizontal position in editor canvas (pixels) | |
| float | editorPosY = 0.0f |
| Vertical position in editor canvas (pixels) - used for execution order sorting. | |
| std::map< std::string, std::string > | stringParams |
| String parameters. | |
| std::map< std::string, int > | intParams |
| Integer parameters. | |
| std::map< std::string, float > | floatParams |
| Float parameters. | |
| std::string | eventType |
| Event type listener (e.g., "Olympe_EventType_AI_Explosion") | |
| std::string | eventMessage |
| Optional event message filter (for future event filtering) | |
| uint32_t | onEventRootIndex = 0 |
| Index into BehaviorTreeAsset::m_eventRootIds for backreference. | |
| std::string | subgraphPath |
| Path to external .bt.json or .ats file. | |
| std::map< std::string, std::string > | subgraphInputs |
| Input bindings: "childVar" → "parentVar". | |
| std::map< std::string, std::string > | subgraphOutputs |
| Output bindings: "childVar" → "parentVar". | |
Represents a single node in a behavior tree.
Can be a composite, decorator, condition, or action node. Stores node type, parameters, and child references.
Definition at line 139 of file BehaviorTree.h.
Definition at line 196 of file BehaviorTree.h.
References floatParams, and GetComponentTypeID_Static().
Here is the call graph for this function:Definition at line 190 of file BehaviorTree.h.
References GetComponentTypeID_Static(), and intParams.
Here is the call graph for this function:
|
inline |
Definition at line 184 of file BehaviorTree.h.
References GetComponentTypeID_Static(), and stringParams.
Here is the call graph for this function:| float BTNode::actionParam1 = 0.0f |
Generic parameter 1 for actions.
Definition at line 154 of file BehaviorTree.h.
| float BTNode::actionParam2 = 0.0f |
Generic parameter 2 for actions.
Definition at line 155 of file BehaviorTree.h.
| BTActionType BTNode::actionType = BTActionType::Idle |
Action type.
Definition at line 153 of file BehaviorTree.h.
| std::vector<uint32_t> BTNode::childIds |
IDs of child nodes.
Definition at line 145 of file BehaviorTree.h.
Referenced by BehaviorTreeAsset::ConnectNodes(), BehaviorTreeAsset::DisconnectNodes(), BehaviorTreeAsset::GetChildrenSortedByY(), Olympe::DeleteNodeCommand::Undo(), and Olympe::BTDeleteNodeCommand::Undo().
| float BTNode::conditionParam = 0.0f |
Generic parameter for conditions.
Definition at line 150 of file BehaviorTree.h.
| BTConditionType BTNode::conditionType = BTConditionType::TargetVisible |
Condition type (enum)
Definition at line 148 of file BehaviorTree.h.
| std::string BTNode::conditionTypeString |
Condition type as string (for flexible conditions like CheckBlackboardValue)
Definition at line 149 of file BehaviorTree.h.
| uint32_t BTNode::decoratorChildId = 0 |
Definition at line 158 of file BehaviorTree.h.
Referenced by BehaviorTreeAsset::ConnectNodes(), BehaviorTreeAsset::DisconnectNodes(), Olympe::DeleteNodeCommand::Undo(), and Olympe::BTDeleteNodeCommand::Undo().
| float BTNode::editorPosX = 0.0f |
Horizontal position in editor canvas (pixels)
Definition at line 165 of file BehaviorTree.h.
| float BTNode::editorPosY = 0.0f |
Vertical position in editor canvas (pixels) - used for execution order sorting.
Definition at line 166 of file BehaviorTree.h.
| std::string BTNode::eventMessage |
Optional event message filter (for future event filtering)
Definition at line 175 of file BehaviorTree.h.
| std::string BTNode::eventType |
Event type listener (e.g., "Olympe_EventType_AI_Explosion")
Definition at line 174 of file BehaviorTree.h.
| std::map<std::string, float> BTNode::floatParams |
| uint32_t BTNode::id = 0 |
Unique node ID within tree.
Definition at line 142 of file BehaviorTree.h.
Referenced by BehaviorTreeAsset::EnsureRootNodeExists(), BehaviorTreeManager::LoadTreeFromFile(), and Olympe::BehaviorTreeRenderer::OnRunGraphClicked().
| std::map<std::string, int> BTNode::intParams |
| std::string BTNode::name |
Definition at line 162 of file BehaviorTree.h.
Referenced by BehaviorTreeManager::ValidateTree().
| uint32_t BTNode::onEventRootIndex = 0 |
Index into BehaviorTreeAsset::m_eventRootIds for backreference.
Definition at line 176 of file BehaviorTree.h.
| int BTNode::repeatCount = 1 |
Definition at line 159 of file BehaviorTree.h.
| std::map<std::string, std::string> BTNode::stringParams |
String parameters.
Definition at line 169 of file BehaviorTree.h.
Referenced by Olympe::EditParameterCommand::Execute(), Olympe::BTEditParameterCommand::Execute(), GetParameterString(), Olympe::EditParameterCommand::Undo(), and Olympe::BTEditParameterCommand::Undo().
| std::map<std::string, std::string> BTNode::subgraphInputs |
Input bindings: "childVar" → "parentVar".
Definition at line 180 of file BehaviorTree.h.
| std::map<std::string, std::string> BTNode::subgraphOutputs |
Output bindings: "childVar" → "parentVar".
Definition at line 181 of file BehaviorTree.h.
| std::string BTNode::subgraphPath |
Path to external .bt.json or .ats file.
Definition at line 179 of file BehaviorTree.h.
Referenced by BehaviorTreeManager::DetectCircularDependencies().
| BTNodeType BTNode::type = BTNodeType::Action |
Node type.
Definition at line 141 of file BehaviorTree.h.
Referenced by BehaviorTreeAsset::AddNode(), and BehaviorTreeAsset::ConnectNodes().