Modificada la seqëncia d'inici per a que la musica començe antes

This commit is contained in:
2025-01-03 22:13:46 +01:00
parent 7cc4a2002a
commit ff7f5ea131
2 changed files with 9 additions and 3 deletions

View File

@@ -1044,8 +1044,7 @@ void Game::disableTimeStopItem()
void Game::checkMusicStatus()
{
// Si se ha completado el juego o los jugadores han terminado, detiene la música
// if (state_ != GameState::COMPLETED && !allPlayersAreGameOver())
if (state_ == GameState::PLAYING)
if (state_ == GameState::PLAYING || state_ == GameState::SHOWING_GET_READY_MESSAGE)
{
playMusic();
}
@@ -1872,7 +1871,7 @@ void Game::updateGameStateEnteringPlayer()
{
state_ = GameState::SHOWING_GET_READY_MESSAGE;
createMessage({paths_.at(0), paths_.at(1)}, Resource::get()->getTexture("game_text_get_ready"));
JA_PlaySound(Resource::get()->getSound("voice_get_ready.wav"));
//JA_PlaySound(Resource::get()->getSound("voice_get_ready.wav"));
}
}
}
@@ -1891,6 +1890,10 @@ void Game::updateGameStateShowingGetReadyMessage()
{
state_ = GameState::PLAYING;
}
else
{
path_sprites_.front()->getCurrentPath()
}
}
// Actualiza las variables durante el transcurso normal del juego

View File

@@ -73,4 +73,7 @@ public:
// Indica si ha terminado todos los recorridos
bool hasFinished();
// Getters
int getCurrentPath() const { return current_path_; }
};