fix: la clase title no hacía fade al pasar al modo demo
This commit is contained in:
@@ -91,6 +91,7 @@ void Title::update()
|
||||
// Actualiza el objeto 'background'
|
||||
background->update();
|
||||
|
||||
// Actualiza el objeto 'defineButtons'
|
||||
defineButtons->update();
|
||||
|
||||
// Comprueba el fade y si se ha acabado
|
||||
@@ -133,29 +134,28 @@ void Title::update()
|
||||
// Sección 2 - La pantalla con el titulo, el fondo animado y la música
|
||||
else if (section->subsection == SUBSECTION_TITLE_2)
|
||||
{
|
||||
if (counter < param->titleCounter)
|
||||
// El contador solo sube si no estamos definiendo botones
|
||||
if (!defineButtons->isEnabled())
|
||||
{
|
||||
// El contador solo sube si no estamos definiendo botones
|
||||
if (!defineButtons->isEnabled())
|
||||
{
|
||||
counter++;
|
||||
}
|
||||
|
||||
// Reproduce la música
|
||||
if ((JA_GetMusicState() == JA_MUSIC_INVALID) || (JA_GetMusicState() == JA_MUSIC_STOPPED))
|
||||
{
|
||||
JA_PlayMusic(music);
|
||||
}
|
||||
|
||||
// Actualiza el logo con el título del juego
|
||||
gameLogo->update();
|
||||
|
||||
// Actualiza el mosaico de fondo
|
||||
tiledbg->update();
|
||||
counter++;
|
||||
}
|
||||
else if (counter >= param->titleCounter)
|
||||
|
||||
// Reproduce la música
|
||||
if ((JA_GetMusicState() == JA_MUSIC_INVALID) || (JA_GetMusicState() == JA_MUSIC_STOPPED))
|
||||
{
|
||||
section->name = SECTION_PROG_GAME_DEMO;
|
||||
JA_PlayMusic(music);
|
||||
}
|
||||
|
||||
// Actualiza el logo con el título del juego
|
||||
gameLogo->update();
|
||||
|
||||
// Actualiza el mosaico de fondo
|
||||
tiledbg->update();
|
||||
|
||||
if (counter == param->titleCounter)
|
||||
{
|
||||
fade->activate();
|
||||
postFade = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user