![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Command to delete a node from the tree. More...
#include <BTEditorCommand.h>
Inheritance diagram for Olympe::BTDeleteNodeCommand:
Collaboration diagram for Olympe::BTDeleteNodeCommand:Classes | |
| struct | Connection |
Public Member Functions | |
| BTDeleteNodeCommand (BehaviorTreeAsset *tree, uint32_t nodeId) | |
| 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 |
| virtual | ~BTEditorCommand ()=default |
Private Attributes | |
| BehaviorTreeAsset * | m_tree |
| uint32_t | m_nodeId |
| BTNode | m_savedNode |
| std::vector< Connection > | m_savedConnections |
Command to delete a node from the tree.
Definition at line 126 of file BTEditorCommand.h.
| Olympe::BTDeleteNodeCommand::BTDeleteNodeCommand | ( | BehaviorTreeAsset * | tree, |
| uint32_t | nodeId | ||
| ) |
Definition at line 134 of file BTEditorCommand.cpp.
References GetComponentTypeID_Static(), m_savedConnections, m_savedNode, and Olympe::BTDeleteNodeCommand::Connection::parentId.
Here is the call graph for this function:
|
overridevirtual |
Execute the command.
Implements Olympe::BTEditorCommand.
Definition at line 177 of file BTEditorCommand.cpp.
References m_nodeId, m_tree, and BehaviorTreeAsset::RemoveNode().
Here is the call graph for this function:
|
overridevirtual |
Get a human-readable description of the command.
Implements Olympe::BTEditorCommand.
Definition at line 222 of file BTEditorCommand.cpp.
References m_nodeId.
|
overridevirtual |
Undo the command.
Implements Olympe::BTEditorCommand.
Definition at line 186 of file BTEditorCommand.cpp.
References BTNode::childIds, BTNode::decoratorChildId, GetComponentTypeID_Static(), BehaviorTreeAsset::GetNode(), m_nodeId, m_savedConnections, m_savedNode, m_tree, and BehaviorTreeAsset::nodes.
Here is the call graph for this function:
|
private |
Definition at line 137 of file BTEditorCommand.h.
Referenced by Execute(), GetDescription(), and Undo().
|
private |
Definition at line 145 of file BTEditorCommand.h.
Referenced by BTDeleteNodeCommand(), and Undo().
|
private |
Definition at line 138 of file BTEditorCommand.h.
Referenced by BTDeleteNodeCommand(), and Undo().
|
private |
Definition at line 136 of file BTEditorCommand.h.