forked from jaildesigner-jailgames/jaildoctors_dilemma
Retocado el final del ending con fade de audio
This commit is contained in:
@@ -212,6 +212,7 @@ void Game::update()
|
||||
checkPlayerAndItems();
|
||||
checkPlayerAndEnemies();
|
||||
checkIfPlayerIsAlive();
|
||||
checkGameOver();
|
||||
checkEndGame();
|
||||
scoreboard->update();
|
||||
input->update();
|
||||
@@ -372,7 +373,7 @@ void Game::checkIfPlayerIsAlive()
|
||||
}
|
||||
|
||||
// Comprueba si ha terminado la partida
|
||||
void Game::checkEndGame()
|
||||
void Game::checkGameOver()
|
||||
{
|
||||
if (board.lives < 0)
|
||||
{
|
||||
@@ -497,4 +498,20 @@ void Game::setScoreBoardColor()
|
||||
// Si el color es negro brillante lo cambia a blanco
|
||||
const color_t cBrightBlack = stringToColor(options->palette, "bright_black");
|
||||
board.color = colorAreEqual(c, cBrightBlack) ? stringToColor(options->palette, "white") : c;
|
||||
}
|
||||
|
||||
// Comprueba si ha finalizado el juego
|
||||
bool Game::checkEndGame()
|
||||
{
|
||||
const bool a = room->getName() == "THE JAIL";
|
||||
const bool b = board.items >= 2;
|
||||
const bool c = player->getRect().x < 152;
|
||||
|
||||
if (a && b && c)
|
||||
{
|
||||
section.name = SECTION_PROG_ENDING;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
Reference in New Issue
Block a user