R-Type
R-Type project
Mouse.hpp
1 /*
2 ** EPITECH PROJECT, 2022
3 ** gameEngine2
4 ** File description:
5 ** Mouse
6 */
7 
8 #ifndef MOUSE_HPP_
9 #define MOUSE_HPP_
10 
11 #include "Vectors.hpp"
12 #include "EventManager.hpp"
13 
14 namespace KapEngine {
15 
16  namespace Events {
17  class EventManager;
18  }
19 
20  namespace Tools {
21  class Vector2;
22  }
23 
24 }
25 
26 namespace KapEngine {
27 
28  namespace Events {
29 
30  class Mouse {
31  public:
32  Mouse(EventManager &manager);
33  ~Mouse();
34 
40  void __update();
41 
48  PROFILER_FUNC_START();
49  PROFILER_FUNC_END();
50  return _mousePos;
51  }
52 
59  bool mouseMoved() const {
60  PROFILER_FUNC_START();
61  PROFILER_FUNC_END();
62  return _mouseMoved;
63  }
64 
65  protected:
66  private:
67  EventManager &manager;
68  Tools::Vector2 _mousePos;
69  bool _mouseMoved = false;
70  };
71 
72  }
73 
74 }
75 
76 #endif /* !MOUSE_HPP_ */
KapEngine::Events::Mouse::__update
void __update()
update intels
Definition: Mouse.cpp:23
KapEngine::Events::Mouse
Definition: Mouse.hpp:30
KapEngine::Events::Mouse::mouseMoved
bool mouseMoved() const
get intel if mouse moved
Definition: Mouse.hpp:59
KapEngine::Events::EventManager
Event manager.
Definition: EventManager.hpp:36
KapEngine::Tools::Vector2
Definition: Vectors.hpp:25
KapEngine::Events::Mouse::getPosition
Tools::Vector2 getPosition() const
Get the Position of mouse.
Definition: Mouse.hpp:47
KapEngine
main namespace
Definition: Component.hpp:17