From ff7f5ea13175697c2d427d6a444cf59130f5d4e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Valor=20Mart=C3=ADnez?= Date: Fri, 3 Jan 2025 22:13:46 +0100 Subject: [PATCH] =?UTF-8?q?Modificada=20la=20seq=C3=ABncia=20d'inici=20per?= =?UTF-8?q?=20a=20que=20la=20musica=20comen=C3=A7e=20antes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/game.cpp | 9 ++++++--- source/path_sprite.h | 3 +++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/source/game.cpp b/source/game.cpp index 64ea3f0..44bdd94 100644 --- a/source/game.cpp +++ b/source/game.cpp @@ -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 diff --git a/source/path_sprite.h b/source/path_sprite.h index 52b6cfd..31fc71e 100644 --- a/source/path_sprite.h +++ b/source/path_sprite.h @@ -73,4 +73,7 @@ public: // Indica si ha terminado todos los recorridos bool hasFinished(); + + // Getters + int getCurrentPath() const { return current_path_; } }; \ No newline at end of file