- Treballant en gamestate_play
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user