preliminar: afegit al marcador el mode game over
This commit is contained in:
@@ -256,6 +256,14 @@ void Game::init(int playerID)
|
||||
|
||||
// Variables para el marcador
|
||||
scoreboard->setPos({param->scoreboard.x, param->scoreboard.y, param->scoreboard.w, param->scoreboard.h});
|
||||
if (!players[0]->isEnabled())
|
||||
{
|
||||
scoreboard->setMode(SCOREBOARD_LEFT_SIDE, SCOREBOARD_MODE_GAME_OVER);
|
||||
}
|
||||
if (!players[1]->isEnabled())
|
||||
{
|
||||
scoreboard->setMode(SCOREBOARD_RIGHT_SIDE, SCOREBOARD_MODE_GAME_OVER);
|
||||
}
|
||||
|
||||
// Resto de variables
|
||||
paused = false;
|
||||
|
||||
@@ -217,8 +217,18 @@ void Scoreboard::fillBackgroundTexture()
|
||||
{
|
||||
if (counter % 10 < 8)
|
||||
{
|
||||
textScoreBoard->writeCentered(offsetScoreP1.x, offsetScoreP1.y, "Mode");
|
||||
textScoreBoard->writeCentered(offsetMultP1Label.x, offsetMultP1Label.y, "Demo");
|
||||
textScoreBoard->writeCentered(offsetScoreP1Label.x, offsetScoreP1Label.y+4, "Mode DEMO");
|
||||
textScoreBoard->writeCentered(offsetMultP1Label.x, offsetMultP1Label.y-2, "Pulsa START");
|
||||
textScoreBoard->writeCentered(offsetMultP1.x, offsetMultP1.y-2, "per jugar");
|
||||
}
|
||||
}
|
||||
|
||||
else if (mode[SCOREBOARD_LEFT_SIDE] == SCOREBOARD_MODE_GAME_OVER)
|
||||
{
|
||||
{
|
||||
textScoreBoard->writeCentered(offsetScoreP1Label.x, offsetScoreP1Label.y+4, "Game Over");
|
||||
textScoreBoard->writeCentered(offsetMultP1Label.x, offsetMultP1Label.y-2, "Pulsa START");
|
||||
textScoreBoard->writeCentered(offsetMultP1.x, offsetMultP1.y-2, "per jugar");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -237,8 +247,18 @@ void Scoreboard::fillBackgroundTexture()
|
||||
{
|
||||
if (counter % 10 < 8)
|
||||
{
|
||||
textScoreBoard->writeCentered(offsetScoreP2.x, offsetScoreP2.y, "Mode");
|
||||
textScoreBoard->writeCentered(offsetMultP2Label.x, offsetMultP2Label.y, "Demo");
|
||||
textScoreBoard->writeCentered(offsetScoreP2Label.x, offsetScoreP2Label.y+4, "Mode DEMO");
|
||||
textScoreBoard->writeCentered(offsetMultP2Label.x, offsetMultP2Label.y-2, "Pulsa START");
|
||||
textScoreBoard->writeCentered(offsetMultP2.x, offsetMultP2.y-2, "per jugar");
|
||||
}
|
||||
}
|
||||
|
||||
else if (mode[SCOREBOARD_RIGHT_SIDE] == SCOREBOARD_MODE_GAME_OVER)
|
||||
{
|
||||
{
|
||||
textScoreBoard->writeCentered(offsetScoreP2Label.x, offsetScoreP2Label.y+4, "Game Over");
|
||||
textScoreBoard->writeCentered(offsetMultP2Label.x, offsetMultP2Label.y-2, "Pulsa START");
|
||||
textScoreBoard->writeCentered(offsetMultP2.x, offsetMultP2.y-2, "per jugar");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user