forked from jaildesigner-jailgames/jaildoctors_dilemma
Trabajando en hacer que puedas entrar a la jail
This commit is contained in:
@@ -45,16 +45,14 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as
|
||||
board.lives = 9;
|
||||
board.items = 0;
|
||||
board.rooms = 1;
|
||||
const color_t c = room->getBorderColor();
|
||||
board.color = (c.r + c.g + c.b == 0) ? stringToColor(options->palette, "white") : c; // Si el color es negro lo cambia a blanco
|
||||
setScoreBoardColor();
|
||||
board.music = true;
|
||||
board.jailEnabled = false;
|
||||
roomTracker->addRoom(currentRoom);
|
||||
paused = false;
|
||||
blackScreen = false;
|
||||
blackScreenCounter = 0;
|
||||
|
||||
// this->player->setInvincible(debug->getEnabled());
|
||||
// board.music = !debug->getEnabled();
|
||||
|
||||
section.name = SECTION_PROG_GAME;
|
||||
section.subsection = 0;
|
||||
}
|
||||
@@ -503,10 +501,16 @@ void Game::setScoreBoardColor()
|
||||
// Comprueba si ha finalizado el juego
|
||||
bool Game::checkEndGame()
|
||||
{
|
||||
|
||||
const bool a = room->getName() == "THE JAIL";
|
||||
const bool b = board.items >= 2;
|
||||
const bool b = board.items >= 5;
|
||||
const bool c = player->getRect().x < 152;
|
||||
|
||||
if (b)
|
||||
{
|
||||
board.jailEnabled = true;
|
||||
}
|
||||
|
||||
if (a && b && c)
|
||||
{
|
||||
section.name = SECTION_PROG_ENDING;
|
||||
|
||||
Reference in New Issue
Block a user