- Treballant en gamestate_play

This commit is contained in:
2023-10-16 18:58:27 +02:00
parent 4c430ec512
commit aa6b79c9ac
3 changed files with 63 additions and 2 deletions

View File

@@ -39,6 +39,8 @@ namespace gamestate
bool loop()
{
static bool salir = false;
const int x = input::mouseX();
const int y = input::mouseY();
@@ -63,6 +65,21 @@ namespace gamestate
draw::render();
if (draw::isfading()) return true;
if (salir)
{
salir = false;
gamestate::play::init();
return true;
}
if (input::anyKeyPressed() || input::mouseBtn(1))
{
draw::fadeout();
salir = true;
return true;
}
return true;
}