Singletonejada la classe Input

This commit is contained in:
2024-09-28 14:19:00 +02:00
parent fa82758ce1
commit 2767696a3f
19 changed files with 87 additions and 44 deletions

View File

@@ -3,11 +3,11 @@
#include "options.h"
// Constructor
Title::Title(Input *input, JA_Music_t *music)
Title::Title(JA_Music_t *music)
{
// Copia las direcciones de los punteros y objetos
this->input = input;
this->music = music;
input = Input::get();
asset = Asset::get();
screen = Screen::get();
SDL_Renderer *renderer = screen->getRenderer();
@@ -29,7 +29,7 @@ Title::Title(Input *input, JA_Music_t *music)
gameLogo = new GameLogo(param.game.gameArea.centerX, param.title.titleCCPosition);
gameLogo->enable();
defineButtons = new DefineButtons(input, text2);
defineButtons = new DefineButtons(text2);
// Inicializa los valores
init();