forked from jaildesigner-jailgames/jaildoctors_dilemma
Ya rueda por los diferentes estados del juego: logo, titulo, creditos, demo
This commit is contained in:
@@ -52,7 +52,7 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Asset *asset, Input *input, D
|
||||
board.music = !debug->getEnabled();
|
||||
|
||||
section.name = SECTION_PROG_GAME;
|
||||
section.subsection = SUBSECTION_GAME_PLAY;
|
||||
section.subsection = 0;
|
||||
}
|
||||
|
||||
Game::~Game()
|
||||
@@ -175,12 +175,8 @@ section_t Game::run()
|
||||
|
||||
while (section.name == SECTION_PROG_GAME)
|
||||
{
|
||||
// Sección juego jugando
|
||||
if (section.subsection == SUBSECTION_GAME_PLAY)
|
||||
{
|
||||
update();
|
||||
render();
|
||||
}
|
||||
update();
|
||||
render();
|
||||
}
|
||||
|
||||
JA_StopMusic();
|
||||
@@ -243,9 +239,9 @@ void Game::render()
|
||||
// Pasa la información de debug
|
||||
void Game::updateDebugInfo()
|
||||
{
|
||||
debug->add("X = " + std::to_string((int)player->x) + ", Y = " + std::to_string((int)player->y));
|
||||
debug->add("VX = " + std::to_string(player->vx).substr(0, 4) + ", VY = " + std::to_string(player->vy).substr(0, 4));
|
||||
debug->add("STATE = " + std::to_string(player->state));
|
||||
debug->add("X = " + std::to_string((int)player->x) + ", Y = " + std::to_string((int)player->y));
|
||||
debug->add("VX = " + std::to_string(player->vx).substr(0, 4) + ", VY = " + std::to_string(player->vy).substr(0, 4));
|
||||
debug->add("STATE = " + std::to_string(player->state));
|
||||
}
|
||||
|
||||
// Pone la información de debug en pantalla
|
||||
|
||||
Reference in New Issue
Block a user