#ifndef KEYS_H #define KEYS_H #include #include class Keys final { public: class Key final { public: friend class Keys; bool isDown() const; bool isReleased() const; int getDownTime() const; private: Key(); Key(const Key&) = delete; Key(Key&&) = delete; Key& operator=(const Key&) = delete; Key& operator=(Key&&) = delete; int glfwKey; bool down; bool shouldRelease; int downTime; }; private: Key keys[18]; public: Keys(); const Key& left; const Key& right; const Key& up; const Key& down; const Key& jump; const Key& sneak; const Key& camLeft; const Key& camRight; const Key& camUp; const Key& camDown; const Key& test; const Key& test2; const Key& test3; const Key& test4; const Key& test5; const Key& test6; const Key& factor; const Key& kdTree; void release(int key); void press(int key); void tick(); private: Keys(const Keys&) = delete; Keys& operator=(const Keys&) = delete; Keys(Key&&) = delete; Keys& operator=(Keys&&) = delete; }; std::ostream& operator<<(std::ostream& os, const Keys::Key& k); #endif