Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
Olympe::BTMoveNodeCommand Class Reference

Command to move a node. More...

#include <BTEditorCommand.h>

+ Inheritance diagram for Olympe::BTMoveNodeCommand:
+ Collaboration diagram for Olympe::BTMoveNodeCommand:

Public Member Functions

 BTMoveNodeCommand (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.
 
- Public Member Functions inherited from Olympe::BTEditorCommand
virtual ~BTEditorCommand ()=default
 
virtual ~BTEditorCommand ()=default
 

Private Attributes

BehaviorTreeAssetm_tree
 
uint32_t m_nodeId
 
Vector m_oldPosition
 
Vector m_newPosition
 

Detailed Description

Command to move a node.

Definition at line 152 of file BTEditorCommand.h.

Constructor & Destructor Documentation

◆ BTMoveNodeCommand()

Olympe::BTMoveNodeCommand::BTMoveNodeCommand ( BehaviorTreeAsset tree,
uint32_t  nodeId,
const Vector oldPos,
const Vector newPos 
)

Definition at line 231 of file BTEditorCommand.cpp.

Member Function Documentation

◆ Execute()

void Olympe::BTMoveNodeCommand::Execute ( )
overridevirtual

Execute the command.

Implements Olympe::BTEditorCommand.

Definition at line 240 of file BTEditorCommand.cpp.

References m_nodeId.

◆ GetDescription()

std::string Olympe::BTMoveNodeCommand::GetDescription ( ) const
overridevirtual

Get a human-readable description of the command.

Implements Olympe::BTEditorCommand.

Definition at line 252 of file BTEditorCommand.cpp.

References m_nodeId.

◆ Undo()

void Olympe::BTMoveNodeCommand::Undo ( )
overridevirtual

Undo the command.

Implements Olympe::BTEditorCommand.

Definition at line 247 of file BTEditorCommand.cpp.

References m_nodeId.

Member Data Documentation

◆ m_newPosition

Vector Olympe::BTMoveNodeCommand::m_newPosition
private

Definition at line 165 of file BTEditorCommand.h.

◆ m_nodeId

uint32_t Olympe::BTMoveNodeCommand::m_nodeId
private

Definition at line 163 of file BTEditorCommand.h.

Referenced by Execute(), GetDescription(), and Undo().

◆ m_oldPosition

Vector Olympe::BTMoveNodeCommand::m_oldPosition
private

Definition at line 164 of file BTEditorCommand.h.

◆ m_tree

BehaviorTreeAsset* Olympe::BTMoveNodeCommand::m_tree
private

Definition at line 162 of file BTEditorCommand.h.


The documentation for this class was generated from the following files: