Added inputSystem

This commit is contained in:
Gulum
2017-10-24 15:58:03 +02:00
parent eb5c1e4ec3
commit 70857cb258
10 changed files with 171 additions and 19 deletions

26
src/input/InputHandler.h Normal file
View 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