![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Command to add a node to the tree. More...
#include <BTEditorCommand.h>
Inheritance diagram for Olympe::AddNodeCommand:
Collaboration diagram for Olympe::AddNodeCommand:Public Member Functions | |
| AddNodeCommand (BehaviorTreeAsset *tree, BTNodeType type, const std::string &name, const Vector &position) | |
| void | Execute () override |
| Execute the command. | |
| void | Undo () override |
| Undo the command. | |
| std::string | GetDescription () const override |
| Get a human-readable description of the command. | |
Public Member Functions inherited from Olympe::BTEditorCommand | |
| virtual | ~BTEditorCommand ()=default |
Private Attributes | |
| BehaviorTreeAsset * | m_tree |
| BTNodeType | m_nodeType |
| std::string | m_nodeName |
| Vector | m_position |
| uint32_t | m_createdNodeId |
Command to add a node to the tree.
Definition at line 105 of file BTEditorCommand.h.
| Olympe::AddNodeCommand::AddNodeCommand | ( | BehaviorTreeAsset * | tree, |
| BTNodeType | type, | ||
| const std::string & | name, | ||
| const Vector & | position | ||
| ) |
Definition at line 97 of file BTEditorCommand.cpp.
|
overridevirtual |
Execute the command.
Implements Olympe::BTEditorCommand.
Definition at line 107 of file BTEditorCommand.cpp.
References BehaviorTreeAsset::AddNode(), m_createdNodeId, m_nodeName, m_nodeType, m_position, and m_tree.
Here is the call graph for this function:
|
overridevirtual |
Get a human-readable description of the command.
Implements Olympe::BTEditorCommand.
Definition at line 125 of file BTEditorCommand.cpp.
References m_nodeName.
|
overridevirtual |
Undo the command.
Implements Olympe::BTEditorCommand.
Definition at line 116 of file BTEditorCommand.cpp.
References m_createdNodeId, m_tree, and BehaviorTreeAsset::RemoveNode().
Here is the call graph for this function:
|
private |
Definition at line 119 of file BTEditorCommand.h.
|
private |
Definition at line 117 of file BTEditorCommand.h.
Referenced by Execute(), and GetDescription().
|
private |
Definition at line 116 of file BTEditorCommand.h.
Referenced by Execute().
|
private |
Definition at line 118 of file BTEditorCommand.h.
Referenced by Execute().
|
private |
Definition at line 115 of file BTEditorCommand.h.