Singletonejada la classe Input
This commit is contained in:
@@ -63,6 +63,9 @@ enum i_disable_e
|
||||
class Input
|
||||
{
|
||||
private:
|
||||
// [SINGLETON] Objeto screen privado para Don Melitón
|
||||
static Input *input;
|
||||
|
||||
struct keyBindings_t
|
||||
{
|
||||
Uint8 scancode; // Scancode asociado
|
||||
@@ -93,10 +96,22 @@ private:
|
||||
// Comprueba el eje del mando
|
||||
bool checkAxisInput(inputs_e input, int index = 0);
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
Input(std::string file);
|
||||
|
||||
// Destructor
|
||||
~Input();
|
||||
|
||||
public:
|
||||
// [SINGLETON] Crearemos el objeto screen con esta función estática
|
||||
static void init(std::string file);
|
||||
|
||||
// [SINGLETON] Destruiremos el objeto screen con esta función estática
|
||||
static void destroy();
|
||||
|
||||
// [SINGLETON] Con este método obtenemos el objeto screen y podemos trabajar con él
|
||||
static Input *get();
|
||||
|
||||
// Actualiza el estado del objeto
|
||||
void update();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user