R-Type  1.0.1.0
Rewrite of the R-Type game with networking ability
Loading...
Searching...
No Matches
EntityManager.hpp
1/*
2** EPITECH PROJECT, 2023
3** EntityManager.hpp
4** File description:
5** EntityManager.hpp
6*/
7
8#ifndef URANUS_ENTITYMANAGER_HPP
9#define URANUS_ENTITYMANAGER_HPP
10
11#include "uranus/engine/components/Base.hpp"
12#include <map>
13
14namespace engine {
16 public:
17 EntityManager() { this->_globalId = 0; };
18
19 ~EntityManager() = default;
20
21 void addPrefab(const std::shared_ptr<engine::Base> &prefab);
22
23 void killAllPrefabs();
24
25 std::shared_ptr<engine::Base> getPrefabByName(const std::string &prefabName);
26
27 std::shared_ptr<engine::Base> getPrefabByNetworkId(std::uint32_t networkId);
28
29 std::shared_ptr<engine::Base> getPrefabByEntityId(std::size_t entityId);
30
31 bool removePrefab(const std::string &prefabName);
32
33 bool removeByNetworkId(std::uint32_t networkId);
34
35 private:
36 std::map<std::string, std::shared_ptr<engine::Base>> _prefabs;
37 int _globalId;
38
39 };
40} // namespace engine
41
42#endif // URANUS_ENTITYMANAGER_HPP
Definition: EntityManager.hpp:15