Restructered Folders and Added Screens to the Game

This commit is contained in:
Julian Nießner
2018-05-11 10:11:06 +02:00
parent 9083487ac9
commit c7426bf24b
11 changed files with 86 additions and 3 deletions

View File

@@ -0,0 +1,35 @@
#include "InputHandler.h"
#include "../DesktopLauncher.h"
#include <iostream>
InputHandler::InputHandler() {
}
InputHandler::~InputHandler() {
//Free all Commands
}
Command* InputHandler::handleInput(SDL_Event *event) {
if(event == NULL) {
return NULL;
}
switch (event->type) {
case SDL_QUIT:
Game::exit();
return NULL;
break;
case SDL_KEYDOWN:
std::cout << "The Key " << SDL_GetKeyName(event->key.keysym.sym) << " has been pressed!" << std::endl;
return NULL;
break;
case SDL_KEYUP:
std::cout << "The Key " << SDL_GetKeyName(event->key.keysym.sym) << " has been released!" << std::endl;
return NULL;
break;
default:
return NULL;
break;
}
}