nous sons per al menu de servei

demo: ara s'escolten els efectes d'audio
This commit is contained in:
2025-06-30 19:38:46 +02:00
parent b15dfdc7e3
commit 5321a9e3b5
5 changed files with 7 additions and 6 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -594,9 +594,9 @@ void Director::runHiScoreTable()
// Ejecuta el juego en modo demo // Ejecuta el juego en modo demo
void Director::runDemoGame() void Director::runDemoGame()
{ {
const auto player_id = (rand() % 2) + 1; const auto PLAYER_ID = (rand() % 2) + 1;
constexpr auto current_stage = 0; constexpr auto CURRENT_STAGE = 0;
auto game = std::make_unique<Game>(player_id, current_stage, GAME_MODE_DEMO_ON); auto game = std::make_unique<Game>(PLAYER_ID, CURRENT_STAGE, GAME_MODE_DEMO_ON);
game->run(); game->run();
} }

View File

@@ -102,7 +102,7 @@ Game::~Game()
// [Modo DEMO] Vuelve a activar los sonidos // [Modo DEMO] Vuelve a activar los sonidos
if (demo_.enabled) if (demo_.enabled)
{ {
Audio::get()->enableSound(); //Audio::get()->enableSound();
} }
else else
{ {
@@ -1652,7 +1652,7 @@ void Game::initDemo(int player_id)
} }
// Deshabilita los sonidos // Deshabilita los sonidos
Audio::get()->disableSound(); //Audio::get()->disableSound();
// Configura los marcadores // Configura los marcadores
scoreboard_->setMode(SCOREBOARD_LEFT_PANEL, ScoreboardMode::DEMO); scoreboard_->setMode(SCOREBOARD_LEFT_PANEL, ScoreboardMode::DEMO);

View File

@@ -30,6 +30,7 @@ ServiceMenu::ServiceMenu()
void ServiceMenu::toggle() void ServiceMenu::toggle()
{ {
playBackSound();
enabled_ = !enabled_; enabled_ = !enabled_;
if (!enabled_) if (!enabled_)
{ {
@@ -130,6 +131,7 @@ void ServiceMenu::selectOption()
void ServiceMenu::moveBack() void ServiceMenu::moveBack()
{ {
playBackSound();
if (current_settings_group_ == SettingsGroup::MAIN) if (current_settings_group_ == SettingsGroup::MAIN)
{ {
enabled_ = false; enabled_ = false;
@@ -138,7 +140,6 @@ void ServiceMenu::moveBack()
current_settings_group_ = previous_settings_group_; current_settings_group_ = previous_settings_group_;
selected_ = (current_settings_group_ == SettingsGroup::MAIN) ? main_menu_selected_ : 0; selected_ = (current_settings_group_ == SettingsGroup::MAIN) ? main_menu_selected_ : 0;
updateMenu(); updateMenu();
playBackSound();
} }
// --- Lógica Interna --- // --- Lógica Interna ---