Empezada la sección del titulo del juego
This commit is contained in:
@@ -33,6 +33,9 @@ Intro::~Intro()
|
||||
texture->unload();
|
||||
delete texture;
|
||||
texture = nullptr;
|
||||
|
||||
delete sprite;
|
||||
sprite = nullptr;
|
||||
}
|
||||
|
||||
// Actualiza las variables
|
||||
@@ -57,15 +60,16 @@ void Intro::update()
|
||||
// Cualquier tecla pulsada
|
||||
if ((eventHandler->type == SDL_KEYDOWN) || (eventHandler->type == SDL_JOYBUTTONDOWN))
|
||||
{
|
||||
section.name = SECTION_PROG_GAME;
|
||||
section.name = SECTION_PROG_TITLE;
|
||||
section.subsection = 0;
|
||||
}
|
||||
}
|
||||
sprite->animate();
|
||||
|
||||
// Comprueba si ha terminado la animación de la intro
|
||||
if (sprite->animationIsCompleted())
|
||||
{
|
||||
section.name = SECTION_PROG_GAME;
|
||||
section.name = SECTION_PROG_TITLE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user