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