input, changes
This commit is contained in:
19
include/game/input.hpp
Normal file
19
include/game/input.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
namespace Game {
|
||||
class Input {
|
||||
public:
|
||||
Input() = delete;
|
||||
|
||||
static void update();
|
||||
static bool isKeyPressed(SDL_Scancode key);
|
||||
static bool isKeyJustPressed(SDL_Scancode key);
|
||||
static bool isKeyJustReleased(SDL_Scancode key);
|
||||
private:
|
||||
static const bool* mCurrentKeyStates;
|
||||
static bool* mPreviousKeyStates;
|
||||
static int mNumKeys;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user