Posat ordre en el Attract Mode
This commit is contained in:
@@ -14,7 +14,7 @@ fade.num_squares_height 120
|
||||
fade.random_squares_delay 1
|
||||
fade.random_squares_mult 500
|
||||
fade.post_duration 80
|
||||
fade.venetian_size 16
|
||||
fade.venetian_size 12
|
||||
|
||||
## SCOREBOARD
|
||||
scoreboard.x 0
|
||||
|
||||
@@ -100,16 +100,19 @@ Game::Game(int player_id, int current_stage, bool demo)
|
||||
|
||||
Game::~Game()
|
||||
{
|
||||
if (!demo_.enabled)
|
||||
// MODO DEMO
|
||||
if (demo_.enabled)
|
||||
{
|
||||
// Habilita los sonidos
|
||||
JA_EnableSound(true);
|
||||
}
|
||||
// MODO JUEGO
|
||||
else
|
||||
{
|
||||
// Guarda las puntuaciones en un fichero
|
||||
auto manager = std::make_unique<ManageHiScoreTable>(options.game.hi_score_table);
|
||||
manager->saveToFile(asset_->get("score.bin"));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Habilita los sonidos
|
||||
JA_EnableSound(true);
|
||||
section::attract_mode = section::AttractMode::TITLE_TO_DEMO;
|
||||
}
|
||||
|
||||
#ifdef RECORDING
|
||||
@@ -313,7 +316,6 @@ void Game::updateGameOverState()
|
||||
if (game_over_counter_ == GAME_OVER_COUNTER_)
|
||||
{
|
||||
createMessage({paths_.at(2), paths_.at(3)}, Resource::get()->getTexture("game_over"));
|
||||
// stopMusic();
|
||||
JA_FadeOutMusic(1000);
|
||||
balloon_manager_->setSounds(true);
|
||||
}
|
||||
@@ -850,7 +852,6 @@ void Game::killPlayer(std::shared_ptr<Player> &player)
|
||||
screen_->shake();
|
||||
JA_PlaySound(Resource::get()->getSound("voice_no.wav"));
|
||||
player->setPlayingState(PlayerState::DYING);
|
||||
// allPlayersAreNotPlaying() ? stopMusic() : resumeMusic();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -991,7 +992,6 @@ void Game::disableTimeStopItem()
|
||||
void Game::checkMusicStatus()
|
||||
{
|
||||
// Si se ha completado el juego o los jugadores han terminado, detiene la música
|
||||
// state_ == GameState::FADE_IN || state_ == GameState::COMPLETED || allPlayersAreGameOver() ? stopMusic() : playMusic();
|
||||
if (state_ != GameState::COMPLETED && !allPlayersAreGameOver())
|
||||
{
|
||||
playMusic();
|
||||
@@ -1374,6 +1374,7 @@ void Game::handleDemoMode()
|
||||
if (input_->checkAnyButtonPressed())
|
||||
{
|
||||
section::name = section::Name::TITLE; // Salir del modo demo y regresar al menú principal.
|
||||
section::attract_mode = section::AttractMode::TITLE_TO_DEMO; // El juego volverá a mostrar la demo
|
||||
return;
|
||||
}
|
||||
++index;
|
||||
|
||||
@@ -205,9 +205,10 @@ void HiScoreTable::checkInput()
|
||||
// Comprueba si se ha pulsado cualquier botón (de los usados para jugar)
|
||||
if (Input::get()->checkAnyButtonPressed())
|
||||
{
|
||||
JA_StopMusic();
|
||||
//JA_StopMusic();
|
||||
section::name = section::Name::TITLE;
|
||||
section::options = section::Options::TITLE_1;
|
||||
section::attract_mode = section::AttractMode::TITLE_TO_DEMO;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -310,9 +310,10 @@ void Instructions::checkInput()
|
||||
// Comprueba si se ha pulsado cualquier botón (de los usados para jugar)
|
||||
if (Input::get()->checkAnyButtonPressed())
|
||||
{
|
||||
JA_StopMusic();
|
||||
//JA_StopMusic();
|
||||
section::name = section::Name::TITLE;
|
||||
section::options = section::Options::TITLE_1;
|
||||
section::attract_mode = section::AttractMode::TITLE_TO_DEMO;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -234,7 +234,8 @@ void Logo::render()
|
||||
void Logo::run()
|
||||
{
|
||||
// Detiene la música
|
||||
JA_StopMusic();
|
||||
//JA_StopMusic();
|
||||
JA_FadeOutMusic(500);
|
||||
|
||||
while (section::name == section::Name::LOGO)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user