My Project
KillSystem.hpp
1 /*
2 ** EPITECH PROJECT, 2022
3 ** B-CPP-500-PAR-5-1-rtype-martin.vanaud
4 ** File description:
5 ** KillSystem
6 */
7 
8 #ifndef KILLSYSTEM_HPP_
9  #define KILLSYSTEM_HPP_
10 
11  /* Ecs */
12  #include "Registry.hpp"
13 
14  /* Graphical Lib */
15  #include "GraphicalLib.hpp"
16 
17  /* Component */
18  #include "Component/CNetworkQueue.hpp"
19  #include "Component/CServerId.hpp"
20  #include "Component/CType.hpp"
21  #include "Component/CSound.hpp"
22 
26 namespace System {
30  class KillSystem {
31  public:
35  KillSystem();
36  ~KillSystem() = default;
37 
47  void operator()(
48  Registry &registry,
53 
61  void killEntity(Registry &registry,
62  std::size_t id,
66 
67  protected:
68  private:
69  std::unique_ptr<rtype::GraphicalLib> _graphicLib;
70  };
71 }
72 
73 #endif /* !KILLSYSTEM_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
Registry
Class that handle ECS.
Definition: Registry.hpp:22
System::KillSystem::killEntity
void killEntity(Registry &registry, std::size_t id, Sparse_array< component::cserverid_t > &serverId, Sparse_array< component::ctype_t > &type, Sparse_array< component::csound_t > &sounds)
A method to kill an entity.
Definition: KillSystem.cpp:31
System::KillSystem::operator()
void operator()(Registry &registry, Sparse_array< component::cnetwork_queue_t > &network, Sparse_array< component::cserverid_t > &serverId, Sparse_array< component::ctype_t > &type, Sparse_array< component::csound_t > &sounds)
Function that will be automaticaly called while the client is working (on loop)
Definition: KillSystem.cpp:21
System::KillSystem
KillSystem class that handles the killing of entities.
Definition: KillSystem.hpp:30
System::KillSystem::KillSystem
KillSystem()
Construct a new Kill System object.
Definition: KillSystem.cpp:16