8 #ifndef SPAWNENEMYSYSTEM_HPP_
9 #define SPAWNENEMYSYSTEM_HPP_
12 #include <unordered_map>
16 #include "Registry.hpp"
19 #include "Component/CNetworkQueue.hpp"
20 #include "Component/CPosition.hpp"
21 #include "Component/CType.hpp"
22 #include "Component/CTimer.hpp"
23 #include "Component/CLobbiesStatus.hpp"
24 #include "Component/CMap.hpp"
25 #include "Component/CHealth.hpp"
28 #include "Structure/spec.hpp"
87 nlohmann::json getJsonData(std::string
const &filepath);
94 void loadAssets(std::string
const &filepath);
102 std::pair<int, int> _mapDimension;
103 std::unordered_map<MAPCONTENT, int> _entityCreator;
104 std::vector<spec_t> _enemySpec;
Class that handle Element of type Component like a vector which can be holed.
Definition: SparseArray.hpp:22
Namespace for systems.
Definition: DirectionSystem.hpp:24
Class that handle ECS.
Definition: Registry.hpp:22
The SpawnEnemy System class, it handles all packets related to the spawn of an enemy in the game.
Definition: SpawnEnemySystem.hpp:37
void operator()(Registry ®istry, Sparse_array< component::cnetwork_queue_t > &netqueue, Sparse_array< component::cposition_t > &position, Sparse_array< component::ctype_t > &type, Sparse_array< component::ctimer_t > &timer, Sparse_array< component::clobbies_status_t > &lobbiesStatus, Sparse_array< component::cmap_t > &map, Sparse_array< component::chealth_t > &health)
The main handler for the SpawnEnemy System.
Definition: SpawnEnemySystem.cpp:38
Class that handle entity in a sparse array like an index.
Definition: Entity.hpp:16
Entity createEnemyFromSpec(Registry ®istry, int enemyType, int lobby_id, std::size_t line, std::size_t map_size)
Create an Enemy object from spec list load from config file.
Definition: SpawnEnemySystem.cpp:68
SpawnEnemySystem()
Construct a new Spawn Enemy System object.
Definition: SpawnEnemySystem.cpp:31