forked from jaildesigner-jailgames/jaildoctors_dilemma
Nuevo: deshabilita input por un periodo de tiempo
This commit is contained in:
@@ -214,6 +214,7 @@ void Game::update()
|
||||
checkIfPlayerIsAlive();
|
||||
checkEndGame();
|
||||
scoreboard->update();
|
||||
input->update();
|
||||
|
||||
updateDebugInfo();
|
||||
updateBlackScreen();
|
||||
@@ -400,6 +401,7 @@ void Game::killPlayer()
|
||||
// Sonido
|
||||
JA_PlaySound(deathSound);
|
||||
|
||||
// Pone la pantalla en negro un tiempo
|
||||
setBlackScreen();
|
||||
|
||||
// Crea la nueva habitación y el nuevo jugador
|
||||
@@ -407,8 +409,12 @@ void Game::killPlayer()
|
||||
const player_t player = {spawnPoint, "player.png", "player.ani", renderer, resource, asset, options, input, room, debug};
|
||||
this->player = new Player(player);
|
||||
|
||||
// Pone los objetos en pausa mientras esta la habitación en negro
|
||||
room->pause();
|
||||
this->player->pause();
|
||||
|
||||
// Deshabilita las entradas hasta que no haya ninguna activa
|
||||
input->disableUntil(d_keyPressed);
|
||||
}
|
||||
|
||||
// Recarga todas las texturas
|
||||
|
||||
Reference in New Issue
Block a user