28 lines
408 B
C
28 lines
408 B
C
|
#ifndef HOLESOME_INPUT_MAPPER_H
|
||
|
#define HOLESOME_INPUT_MAPPER_H
|
||
|
|
||
|
#include "../game.h"
|
||
|
#include <SFML/Window/Event.hpp>
|
||
|
#include "../../config.h"
|
||
|
|
||
|
class Game;
|
||
|
|
||
|
/**
|
||
|
* Maps the inputs to actions.
|
||
|
*/
|
||
|
class InputMapper
|
||
|
{
|
||
|
public:
|
||
|
explicit InputMapper(Game *game);
|
||
|
|
||
|
void processEvents();
|
||
|
|
||
|
private:
|
||
|
Game *game;
|
||
|
|
||
|
void handleKeyPress(sf::Event::KeyEvent event);
|
||
|
};
|
||
|
|
||
|
|
||
|
#endif //HOLESOME_INPUT_MAPPER_H
|