18 lines
416 B
C++
18 lines
416 B
C++
#pragma once
|
|
#include "OpenGlExtensions.h"
|
|
|
|
namespace ZL {
|
|
class InputManager {
|
|
public:
|
|
static InputManager& getInstance();
|
|
void processInput();
|
|
bool isKeyPressed(SDL_Scancode key) const;
|
|
bool shouldQuit() const { return mShouldQuit; }
|
|
|
|
private:
|
|
InputManager() = default;
|
|
bool mKeys[SDL_NUM_SCANCODES] = {false};
|
|
bool mShouldQuit = false;
|
|
};
|
|
}
|