fix: la musica del mode DEMO no era la correcta
This commit is contained in:
@@ -151,7 +151,7 @@ void Game::update()
|
||||
}
|
||||
DEMO_checkRoomChange();
|
||||
scoreboard_->update();
|
||||
|
||||
keepMusicPlaying();
|
||||
updateBlackScreen();
|
||||
|
||||
Screen::get()->update();
|
||||
@@ -698,4 +698,16 @@ void Game::DEMO_checkRoomChange()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Hace sonar la música
|
||||
void Game::keepMusicPlaying()
|
||||
{
|
||||
const std::string music_path = mode_ == GameMode::GAME ? "game.ogg" : "title.ogg";
|
||||
|
||||
// Si la música no está sonando
|
||||
if (JA_GetMusicState() == JA_MUSIC_INVALID || JA_GetMusicState() == JA_MUSIC_STOPPED)
|
||||
{
|
||||
JA_PlayMusic(Resource::get()->getMusic(music_path));
|
||||
}
|
||||
}
|
||||
@@ -157,6 +157,9 @@ private:
|
||||
// DEMO MODE: Comprueba si se ha de cambiar de habitación
|
||||
void DEMO_checkRoomChange();
|
||||
|
||||
// Hace sonar la música
|
||||
void keepMusicPlaying();
|
||||
|
||||
public:
|
||||
// Constructor
|
||||
Game(GameMode mode);
|
||||
|
||||
Reference in New Issue
Block a user