Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include "InputListener.h"
- #include <unordered_set>
- #include "Point.h"
- class InputSystem
- {
- public:
- InputSystem();
- ~InputSystem();
- void update();
- void addListener(InputListener* listener);
- void removeListener(InputListener* listener);
- public:
- static InputSystem* get();
- private:
- std::unordered_set<InputListener*> m_set_listeners;
- unsigned char m_keys_state[256] = {};
- unsigned char m_old_keys_state[256] = {};
- Point m_old_mouse_pos;
- bool m_first_time = true;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement