R-Type
PressableSystem.hpp
Go to the documentation of this file.
1 /*
2 ** EPITECH PROJECT, 2023
3 ** R-Type
4 ** File description:
5 ** PressableSystem
6 */
7 
8 #ifndef PRESSABLESYSTEM_HPP_
9 #define PRESSABLESYSTEM_HPP_
10 #include "SparseArray.hpp"
14 #include "Event.hpp"
15 #include "utils/SfmlTypes.hpp"
16 #include <functional>
17 
18 namespace GameEngine
19 {
20  using PressableFunction = std::function<void(SparseArray<TransformComponent> &transforms,
22 
24  {
25  public:
26  PressableSystem(EventManager &eventManager) : _eventManager(eventManager){};
27  ~PressableSystem() = default;
28 
31 
32  private:
33  EventManager &_eventManager;
34  bool _lastMouseState = false;
35  };
36 } // namespace GameEngine
37 
38 #endif /* !PRESSABLESYSTEM_HPP_ */
class to help create and manage all the event handlers
Definition: Event.hpp:135
Definition: PressableSystem.hpp:24
void operator()(SparseArray< TransformComponent > &transforms, SparseArray< TextureComponent > &textures, SparseArray< PressableComponent > &pressables)
Definition: PressableSystem.cpp:13
PressableSystem(EventManager &eventManager)
Definition: PressableSystem.hpp:26
Array which can have empty indexes.
Definition: SparseArray.hpp:19
Definition: AssetManager.hpp:15
std::function< void(SparseArray< TransformComponent > &transforms, SparseArray< TextureComponent > &textures, SparseArray< PressableComponent > &pressables)> PressableFunction
Definition: PressableSystem.hpp:21