![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Command to move a node. More...
#include <BTEditorCommand.h>
Inheritance diagram for Olympe::MoveNodeCommand:
Collaboration diagram for Olympe::MoveNodeCommand:Public Member Functions | |
| MoveNodeCommand (BehaviorTreeAsset *tree, uint32_t nodeId, const Vector &oldPos, const Vector &newPos) | |
| 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. | |
| MoveNodeCommand (int32_t nodeID, float oldX, float oldY, float newX, float newY) | |
| void | Execute (TaskGraphTemplate &graph) override |
| Applies the command to the graph. | |
| void | Undo (TaskGraphTemplate &graph) override |
| Reverses the command on the graph. | |
| 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 |
Public Member Functions inherited from Olympe::ICommand | |
| virtual | ~ICommand ()=default |
Static Private Member Functions | |
| static void | SetNodePos (TaskGraphTemplate &graph, int32_t nodeID, float x, float y) |
Private Attributes | |
| BehaviorTreeAsset * | m_tree |
| uint32_t | m_nodeId |
| Vector | m_oldPosition |
| Vector | m_newPosition |
| int32_t | m_nodeID |
| float | m_oldX |
| float | m_oldY |
| float | m_newX |
| float | m_newY |
Command to move a node.
Records a "move node" (position change) for undo/redo.
Node position is stored in the Parameters map under the keys "__posX" and "__posY" (editor-internal convention).
Definition at line 157 of file BTEditorCommand.h.
| Olympe::MoveNodeCommand::MoveNodeCommand | ( | BehaviorTreeAsset * | tree, |
| uint32_t | nodeId, | ||
| const Vector & | oldPos, | ||
| const Vector & | newPos | ||
| ) |
Definition at line 236 of file BTEditorCommand.cpp.
| Olympe::MoveNodeCommand::MoveNodeCommand | ( | int32_t | nodeID, |
| float | oldX, | ||
| float | oldY, | ||
| float | newX, | ||
| float | newY | ||
| ) |
Definition at line 129 of file UndoRedoStack.cpp.
|
overridevirtual |
Execute the command.
Implements Olympe::BTEditorCommand.
Definition at line 245 of file BTEditorCommand.cpp.
References m_nodeId.
|
overridevirtual |
Applies the command to the graph.
Implements Olympe::ICommand.
Definition at line 158 of file UndoRedoStack.cpp.
References GetComponentTypeID_Static(), m_newX, m_newY, m_nodeID, and SetNodePos().
Here is the call graph for this function:
|
overridevirtual |
Get a human-readable description of the command.
Implements Olympe::BTEditorCommand.
Definition at line 257 of file BTEditorCommand.cpp.
References m_nodeId.
|
overridevirtual |
Get a human-readable description of the command.
Implements Olympe::BTEditorCommand.
|
staticprivate |
Definition at line 138 of file UndoRedoStack.cpp.
References GetComponentTypeID_Static(), Olympe::Literal, and Olympe::ParameterBinding::Type.
Referenced by Execute(), and Undo().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Undo the command.
Implements Olympe::BTEditorCommand.
Definition at line 252 of file BTEditorCommand.cpp.
References m_nodeId.
|
overridevirtual |
Reverses the command on the graph.
Implements Olympe::ICommand.
Definition at line 163 of file UndoRedoStack.cpp.
References GetComponentTypeID_Static(), m_nodeID, m_oldX, m_oldY, and SetNodePos().
Here is the call graph for this function:
|
private |
Definition at line 170 of file BTEditorCommand.h.
|
private |
Definition at line 117 of file UndoRedoStack.h.
Referenced by Execute().
|
private |
Definition at line 117 of file UndoRedoStack.h.
Referenced by Execute().
|
private |
Definition at line 168 of file BTEditorCommand.h.
Referenced by Execute(), GetDescription(), and Undo().
|
private |
Definition at line 115 of file UndoRedoStack.h.
|
private |
Definition at line 169 of file BTEditorCommand.h.
|
private |
Definition at line 116 of file UndoRedoStack.h.
Referenced by Undo().
|
private |
Definition at line 116 of file UndoRedoStack.h.
Referenced by Undo().
|
private |
Definition at line 167 of file BTEditorCommand.h.