Empezada la sección del titulo del juego

This commit is contained in:
2022-08-23 12:35:56 +02:00
parent 6b4926efb8
commit b61677bda9
8 changed files with 180 additions and 11 deletions

View File

@@ -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;
}
}
}