Pantalla a negro al morir

This commit is contained in:
2022-09-15 20:07:13 +02:00
parent 9ea184946d
commit 8e7b807fa8
5 changed files with 103 additions and 16 deletions

View File

@@ -45,6 +45,9 @@ private:
player_t spawnPoint; // Lugar de la habitación donde aparece el jugador
JA_Sound deathSound; // Sonido a reproducir cuando muere el jugador
board_t board; // Estructura con los datos del marcador
bool paused; // Indica si el juego se encuentra en pausa
bool blackScreen; // Indica si la pantalla está en negro. Se utiliza para la muerte del jugador
int blackScreenCounter; // Contador para temporizar la pantalla en negro
Test *test;
// Actualiza el juego, las variables, comprueba la entrada, etc.
@@ -89,6 +92,12 @@ private:
// Recarga todas las texturas
void reLoadTextures();
// Actualiza las variables relativas a la pantalla en negro
void updateBlackScreen();
// Dibuja la pantalla negra
void renderBlackScreen();
public:
// Constructor
Game(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input, Debug *debug);