My Project
StartGameSystem.hpp
1 /*
2 ** EPITECH PROJECT, 2022
3 ** B-CPP-500-PAR-5-1-rtype-martin.vanaud
4 ** File description:
5 ** StartGameSystem
6 */
7 
8 #ifndef STARTGAMESYSTEM_HPP_
9  #define STARTGAMESYSTEM_HPP_
10 
11  /* Ecs */
12  #include "Registry.hpp"
13 
14  /* Component */
15  #include "Component/CNetworkQueue.hpp"
16  #include "Component/CLobbiesToEntities.hpp"
17  #include "Component/CLobbyId.hpp"
18  #include "Component/CNetIdToClientId.hpp"
19  #include "Component/CPosition.hpp"
20  #include "Component/CType.hpp"
21  #include "Component/CLobbiesStatus.hpp"
22  #include "Component/CHealth.hpp"
23 
27 namespace System {
32  public:
37  ~StartGameSystem() = default;
38 
45  Entity createSpaceShip(Registry &registry, int lobbyId);
46 
59  void operator()(
60  Registry &registry,
69  );
70 
71  protected:
72  private:
73  };
74 }
75 
76 #endif /* !STARTGAMESYSTEM_HPP_ */
Sparse_array
Class that handle Element of type Component like a vector which can be holed.
Definition: SparseArray.hpp:22
System
Namespace for systems.
Definition: DirectionSystem.hpp:24
System::StartGameSystem
System in charge of handle start of game.
Definition: StartGameSystem.hpp:31
Registry
Class that handle ECS.
Definition: Registry.hpp:22
System::StartGameSystem::createSpaceShip
Entity createSpaceShip(Registry &registry, int lobbyId)
Create a Space Ship object.
Definition: StartGameSystem.cpp:29
System::StartGameSystem::operator()
void operator()(Registry &registry, Sparse_array< component::cnetwork_queue_t > &netqueue, Sparse_array< component::clobby_id_t > &LobbyId, Sparse_array< component::cnet_id_to_client_id_t > &netIdToClientId, Sparse_array< component::clobbies_to_entities_t > &lobbiesToEntities, Sparse_array< component::cposition_t > &position, Sparse_array< component::ctype_t > &type, Sparse_array< component::clobbies_status_t > &lobbiesStatus, Sparse_array< component::chealth_t > &health)
The main handler for the StartGame System.
Definition: StartGameSystem.cpp:43
Entity
Class that handle entity in a sparse array like an index.
Definition: Entity.hpp:16
System::StartGameSystem::StartGameSystem
StartGameSystem()
Construct a new Start Game System object.
Definition: StartGameSystem.cpp:25