galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
EntityManager.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_ENTITY_ENTITYMANAGER_HPP_
9#define GALAXY_ENTITY_ENTITYMANAGER_HPP_
10
11#include <entt/entity/registry.hpp>
12
13namespace galaxy
14{
20 class EntityManager final
21 {
25 // using B2BodyConstruction = meta::vector<std::pair<components::RigidBody*, components::Transform*>>;
26
27 public:
31 EntityManager() noexcept;
32
36 EntityManager(EntityManager&&) noexcept;
37
42
46 ~EntityManager() noexcept;
47
53 [[nodiscard]]
54 entt::registry& registry() noexcept;
55
56 private:
60 EntityManager(const EntityManager&) = delete;
61
66
67 private:
71 entt::registry m_registry;
72 };
73} // namespace galaxy
74
80//[[maybe_unused]]
81// entt::entity create();
82
90//[[maybe_unused]]
91// entt::entity create_from_prefab(const std::string& name);
92
100//[[nodiscard]]
101// bool is_valid(const entt::entity entity);
102
110// void update(b2World& b2World);
111
115// void clear();
116
123// void construct_rigidbody(entt::registry& registry, entt::entity entity);
124
131// void destroy_rigidbody(entt::registry& registry, entt::entity entity);
132
139// void construct_script(entt::registry& registry, entt::entity entity);
140
147// void destruct_script(entt::registry& registry, entt::entity entity);
148
155// void construct_nui(entt::registry& registry, entt::entity entity);
156
163// void destruct_nui(entt::registry& registry, entt::entity entity);
164
171// void enable_entity(entt::registry& registry, entt::entity entity);
172
179// void disable_entity(entt::registry& registry, entt::entity entity);
180
184// B2BodyConstruction m_bodies_to_construct;
185
186#endif
EntityManager & operator=(const EntityManager &)=delete
Copy assignment operator.
EntityManager() noexcept
Typedef for creating b2 bodies from components.
EntityManager & operator=(EntityManager &&) noexcept
Move assignment operator.
EntityManager(const EntityManager &)=delete
Copy constructor.
entt::registry m_registry
entt registry.
entt::registry & registry() noexcept
Get entity registry.
Tag.cpp galaxy.
Definition Tag.cpp:13