Terminado el cálculo de superficies

This commit is contained in:
2022-09-07 22:47:22 +02:00
parent a73c11effa
commit 044cf97857
7 changed files with 139 additions and 57 deletions

View File

@@ -33,9 +33,9 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input, D
playerLives = 9;
itemsPicked = 0;
debugEnabled = true;
player->setInvincible(debugEnabled);
musicEnabled = !debugEnabled;
debug->setEnabled(true);
player->setInvincible(debug->getEnabled());
musicEnabled = !debug->getEnabled();
section.name = SECTION_PROG_GAME;
section.subsection = SUBSECTION_GAME_PLAY;
@@ -79,9 +79,9 @@ void Game::checkEventHandler()
break;
case SDL_SCANCODE_D:
debugEnabled = !debugEnabled;
player->setInvincible(debugEnabled);
musicEnabled = !debugEnabled;
debug->switchEnabled();
player->setInvincible(debug->getEnabled());
musicEnabled = !debug->getEnabled();
musicEnabled ? JA_PlayMusic(music) : JA_StopMusic();
break;
@@ -200,7 +200,7 @@ void Game::updateDebugInfo()
// Pone la información de debug en pantalla
void Game::renderDebugInfo()
{
if (!debugEnabled)
if (!debug->getEnabled())
{
return;
}