SDL SPOOKY PLATFORMER ENGINE
0.2.0
An implementation of a platformer using sdl, implemented using an entity component system and efficient collision management.
Main Page
Related Pages
Classes
Files
File List
File Members
include
InputManager.hpp
Go to the documentation of this file.
1
#ifndef INPUTMANAGER_HPP
2
#define INPUTMANAGER_HPP
3
4
#include <map>
5
6
enum
Input
{
7
Left
= 0,
8
Right
,
9
Jump
,
10
Invincible
,
11
ToggleFPS
,
12
Restart
13
};
14
18
class
InputManager
{
19
public
:
23
~InputManager
();
24
28
static
InputManager
&
getInstance
();
29
33
void
init
();
37
void
initInput
(
unsigned
int
id
);
41
void
setInputDown
(
unsigned
int
id
,
bool
inputDown);
45
bool
getInputDown
(
unsigned
int
id
);
49
void
shutdown
();
50
51
private
:
52
InputManager
();
53
54
bool
initialized{
false
};
55
static
InputManager
* instance;
56
std::map<unsigned int, bool> inputsDown;
57
};
58
#endif
InputManager::shutdown
void shutdown()
Definition:
InputManager.cpp:42
InputManager::getInputDown
bool getInputDown(unsigned int id)
Definition:
InputManager.cpp:35
InputManager::setInputDown
void setInputDown(unsigned int id, bool inputDown)
Definition:
InputManager.cpp:29
InputManager::initInput
void initInput(unsigned int id)
Definition:
InputManager.cpp:25
InputManager::init
void init()
Definition:
InputManager.cpp:20
InputManager::getInstance
static InputManager & getInstance()
Definition:
InputManager.cpp:15
InputManager::~InputManager
~InputManager()
Definition:
InputManager.cpp:6
InputManager
Definition:
InputManager.hpp:18
Restart
Definition:
InputManager.hpp:12
ToggleFPS
Definition:
InputManager.hpp:11
Invincible
Definition:
InputManager.hpp:10
Jump
Definition:
InputManager.hpp:9
Right
Definition:
InputManager.hpp:8
Left
Definition:
InputManager.hpp:7
Input
Input
Definition:
InputManager.hpp:6
Generated on Tue Mar 16 2021 02:10:18 for SDL SPOOKY PLATFORMER ENGINE by
1.4.1