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

@@ -204,6 +204,7 @@ void Prog::setSection(section_t section)
this->section = section;
}
// Ejecuta la seccion de juego con el logo
void Prog::runLogo()
{
logo = new Logo(renderer, screen, asset);
@@ -219,9 +220,18 @@ void Prog::runIntro()
delete intro;
}
// Ejecuta la seccion de juego con el titulo y los menus
void Prog::runTitle()
{
title = new Title(renderer, screen, asset, input);
setSection(title->run());
delete title;
}
// Ejecuta la seccion de juego donde se juega
void Prog::runGame()
{
game = new Game(renderer, asset, screen, input);
game = new Game(renderer, screen, asset, input);
setSection(game->run());
delete game;
}
@@ -240,7 +250,7 @@ void Prog::run()
runIntro();
break;
case SECTION_PROG_TITLE:
// runTitle();
runTitle();
break;
case SECTION_PROG_GAME:
runGame();