forked from jaildesigner-jailgames/jaildoctors_dilemma
Añadido el esqueleto para dos secciones nuevas: ending y game_over
This commit is contained in:
@@ -298,6 +298,24 @@ void Director::loadResources(section_t section)
|
||||
resource->loadOffsets(offsetsList);
|
||||
}
|
||||
|
||||
else if (section.name == SECTION_PROG_ENDING)
|
||||
{
|
||||
std::vector<std::string> textureList;
|
||||
textureList.push_back("jailgames.png");
|
||||
textureList.push_back("since_1998.png");
|
||||
|
||||
resource->loadTextures(textureList);
|
||||
}
|
||||
|
||||
else if (section.name == SECTION_PROG_GAME_OVER)
|
||||
{
|
||||
std::vector<std::string> textureList;
|
||||
textureList.push_back("jailgames.png");
|
||||
textureList.push_back("since_1998.png");
|
||||
|
||||
resource->loadTextures(textureList);
|
||||
}
|
||||
|
||||
else if (section.name == SECTION_PROG_GAME || section.name == SECTION_PROG_DEMO)
|
||||
{
|
||||
// Texturas
|
||||
@@ -1166,6 +1184,34 @@ void Director::runDemo()
|
||||
resource->free();
|
||||
}
|
||||
|
||||
// Ejecuta la seccion del final del juego
|
||||
void Director::runEnding()
|
||||
{
|
||||
if (options->console)
|
||||
{
|
||||
std::cout << "\n* SECTION: ENDING" << std::endl;
|
||||
}
|
||||
loadResources(section);
|
||||
ending = new Ending(renderer, screen, resource, asset, options);
|
||||
setSection(ending->run());
|
||||
delete ending;
|
||||
resource->free();
|
||||
}
|
||||
|
||||
// Ejecuta la seccion del final de la partida
|
||||
void Director::runGameOver()
|
||||
{
|
||||
if (options->console)
|
||||
{
|
||||
std::cout << "\n* SECTION: GAME OVER" << std::endl;
|
||||
}
|
||||
loadResources(section);
|
||||
gameOver = new GameOver(renderer, screen, resource, asset, options);
|
||||
setSection(gameOver->run());
|
||||
delete gameOver;
|
||||
resource->free();
|
||||
}
|
||||
|
||||
// Ejecuta la seccion de juego donde se juega
|
||||
void Director::runGame()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user