varios ajustos
This commit is contained in:
@@ -112,8 +112,11 @@ void Game::init(int playerID)
|
||||
Player *player2 = new Player((PLAY_AREA_CENTER_FIRST_QUARTER_X * ((1 * 2) + 1)) - 11, PLAY_AREA_BOTTOM - 30, playerTextures[1], playerAnimations);
|
||||
players.push_back(player2);
|
||||
|
||||
// Habilita el jugador seleccionado. playerID es player 1 o player 2
|
||||
players[playerID - 1]->enable(true);
|
||||
// Habilita el jugador seleccionado
|
||||
players[playerID]->enable(true);
|
||||
|
||||
// Como es el principio del juego, empieza sin inmunidad
|
||||
players[playerID]->setInvulnerable(false);
|
||||
|
||||
// Variables relacionadas con la dificultad
|
||||
switch (difficulty)
|
||||
@@ -153,6 +156,7 @@ void Game::init(int playerID)
|
||||
{
|
||||
scoreboard->setMode(SCOREBOARD_RIGHT_PANEL, SCOREBOARD_MODE_GAME_OVER);
|
||||
}
|
||||
scoreboard->setMode(SCOREBOARD_CENTER_PANEL, SCOREBOARD_MODE_STAGE_INFO);
|
||||
|
||||
// Resto de variables
|
||||
paused = false;
|
||||
@@ -195,7 +199,7 @@ void Game::init(int playerID)
|
||||
const int demo = rand() % demos;
|
||||
const int stages[demos] = {0, 3, 5};
|
||||
currentStage = stages[demo];
|
||||
|
||||
|
||||
// Actualiza el numero de globos explotados según la fase de la demo
|
||||
for (int i = 0; i < currentStage; ++i)
|
||||
{
|
||||
@@ -205,8 +209,8 @@ void Game::init(int playerID)
|
||||
// Activa o no al otro jugador
|
||||
if (rand() % 2 == 0)
|
||||
{
|
||||
const int otherPlayer = playerID == 1 ? 2 : 1;
|
||||
players[otherPlayer - 1]->enable(true);
|
||||
const int otherPlayer = playerID == 1 ? 1 : 0;
|
||||
players[otherPlayer]->enable(true);
|
||||
}
|
||||
|
||||
for (auto player : players)
|
||||
@@ -214,7 +218,7 @@ void Game::init(int playerID)
|
||||
// Añade 0, 1 o 2 cafes al jugador
|
||||
for (int i = 0; i < rand() % 3; ++i)
|
||||
{
|
||||
player->giveExtraHit();
|
||||
//player->giveExtraHit();
|
||||
}
|
||||
|
||||
// Empieza sin inmunidad
|
||||
|
||||
Reference in New Issue
Block a user