Added inputSystem
This commit is contained in:
26
src/input/InputHandler.h
Normal file
26
src/input/InputHandler.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef INPUTHANDLER_H
|
||||
#define INPUTHANDLER_H
|
||||
|
||||
#include <vector>
|
||||
#include <SDL2/SDL.h>
|
||||
#include "commands/TestCommand.h"
|
||||
|
||||
|
||||
class InputHandler {
|
||||
private:
|
||||
Command* buttonW = NULL;
|
||||
Command* buttonA = NULL;
|
||||
Command* buttonS = NULL;
|
||||
Command* buttonD = NULL;
|
||||
|
||||
unsigned int cur = 0;
|
||||
std::vector<Command*> commandStream;
|
||||
|
||||
public:
|
||||
InputHandler();
|
||||
~InputHandler();
|
||||
void inputEvent(SDL_Event *e);
|
||||
Command* handleInput();
|
||||
};
|
||||
|
||||
#endif // INPUTHANDLER_H
|
||||
Reference in New Issue
Block a user