Fet el fade out del title de video i audio i el fade in del joc de video i audio
Actualitzat jail_audio a la última versió
This commit is contained in:
@@ -31,7 +31,7 @@ Title::Title()
|
||||
fade_(std::make_unique<Fade>()),
|
||||
tiled_bg_(std::make_unique<TiledBG>(param.game.game_area.rect, TiledBGMode::RANDOM)),
|
||||
game_logo_(std::make_unique<GameLogo>(param.game.game_area.center_x, param.title.title_c_c_position)),
|
||||
mini_logo_sprite_(std::make_unique<Sprite>(Resource::get()->getTexture("logo_jailgames_mini.png"))),
|
||||
mini_logo_sprite_(std::make_unique<Sprite>(Resource::get()->getTexture("logo_jailgames_mini.png"))),
|
||||
define_buttons_(std::make_unique<DefineButtons>()),
|
||||
num_controllers_(Input::get()->getNumControllers())
|
||||
{
|
||||
@@ -71,11 +71,11 @@ void Title::update()
|
||||
Screen::get()->update();
|
||||
|
||||
// Actualiza las variables de globalInputs
|
||||
globalInputs::update();
|
||||
globalInputs::update();
|
||||
|
||||
// Comprueba el fundido y si se ha acabado
|
||||
fade_->update();
|
||||
JA_SetMusicVolume(100 - fade_->getValue());
|
||||
// JA_SetMusicVolume(100 - fade_->getValue());
|
||||
if (fade_->hasEnded())
|
||||
{
|
||||
if (post_fade_ == -1)
|
||||
@@ -109,7 +109,10 @@ void Title::update()
|
||||
// Reproduce la música
|
||||
if ((JA_GetMusicState() == JA_MUSIC_INVALID) || (JA_GetMusicState() == JA_MUSIC_STOPPED))
|
||||
{
|
||||
JA_PlayMusic(Resource::get()->getMusic("title.ogg"));
|
||||
if (!fade_->isEnabled())
|
||||
{
|
||||
JA_PlayMusic(Resource::get()->getMusic("title.ogg"));
|
||||
}
|
||||
}
|
||||
|
||||
// Actualiza el logo con el título del juego
|
||||
@@ -255,6 +258,8 @@ void Title::checkInput()
|
||||
if (section::options == section::Options::TITLE_2 || ALLOW_TITLE_ANIMATION_SKIP)
|
||||
{
|
||||
fade_->activate();
|
||||
JA_FadeOutMusic(1500);
|
||||
JA_PlaySound(Resource::get()->getSound("game_start.wav"));
|
||||
post_fade_ = controller.player_id;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user