21 lines
275 B
C++
21 lines
275 B
C++
#pragma once
|
|
|
|
struct GLFWwindow;
|
|
|
|
class KeyObserver
|
|
{
|
|
private:
|
|
GLFWwindow* _window;
|
|
int _key;
|
|
|
|
public:
|
|
bool IsPressed;
|
|
bool WasPressed;
|
|
bool WasReleased;
|
|
|
|
KeyObserver() : _window(nullptr), _key(-1) { }
|
|
KeyObserver(GLFWwindow* window, int keyCode);
|
|
|
|
void Update();
|
|
};
|