Grindstone Game Engine
v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
EntityCommands.hpp
1
#pragma once
2
3
#include <entt/entt.hpp>
4
#include "CommandList.hpp"
5
#include "ComponentCommands.hpp"
6
7
namespace
Grindstone {
8
namespace
SceneManagement {
9
class
Scene;
10
}
11
12
namespace
Editor {
13
class
AddEntityCommand
:
public
BaseCommand
{
14
public
:
15
AddEntityCommand
(
SceneManagement::Scene
* scene);
16
virtual
void
Redo()
override
;
17
virtual
void
Undo()
override
;
18
virtual
~AddEntityCommand
() {}
19
public
:
20
SceneManagement::Scene
* scene;
21
ECS::EntityHandle entityId;
22
};
23
24
class
DeleteEntityCommand
:
public
BaseCommand
{
25
public
:
26
virtual
void
Redo()
override
;
27
virtual
void
Undo()
override
;
28
virtual
~DeleteEntityCommand
() {}
29
private
:
30
entt::registry& registry;
31
ECS::EntityHandle entityId;
32
std::vector<AddComponentCommand> componentCommands;
33
};
34
}
35
}
Grindstone::Editor::AddEntityCommand
Definition
EntityCommands.hpp:13
Grindstone::Editor::BaseCommand
Definition
CommandList.hpp:13
Grindstone::Editor::DeleteEntityCommand
Definition
EntityCommands.hpp:24
Grindstone::SceneManagement::Scene
Definition
Scene.hpp:21
sources
code
Editor
Commands
EntityCommands.hpp
Generated by
1.12.0