Trabajando en la pantalla de game over

This commit is contained in:
2022-11-06 19:28:12 +01:00
parent 6dfc7e135c
commit 6fe596bf48
4 changed files with 52 additions and 19 deletions

View File

@@ -40,7 +40,7 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as
// Inicializa el resto de variables
ticks = 0;
ticksSpeed = 15;
board.lives = 9;
board.lives = 0;
board.items = 0;
board.rooms = 1;
board.music = true;
@@ -370,7 +370,7 @@ void Game::checkIfPlayerIsAlive()
// Comprueba si ha terminado la partida
void Game::checkGameOver()
{
if (board.lives < 0)
if (board.lives < 0 && blackScreenCounter > 17)
{
section.name = SECTION_PROG_GAME_OVER;
}