From 0441ff72c3efb104aaeeab14f99d1f4012a28eb0 Mon Sep 17 00:00:00 2001 From: Jakub Skokan Date: Wed, 13 Jul 2016 09:33:03 +0200 Subject: [PATCH] Extend scoreboard duration, continue by return/A --- src/game.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/game.cpp b/src/game.cpp index 773815c..16e85e1 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -282,8 +282,13 @@ int Game::gameLoop() #endif } else if(event.type == SDL_KEYUP) { - // handle player controls - updateControls(event.key.keysym.sym, false); + if (state == FINISHED && event.key.keysym.sym == SDLK_RETURN) { + loop = false; + + } else { + // handle player controls + updateControls(event.key.keysym.sym, false); + } } else if (event.type == SDL_CONTROLLERBUTTONUP) { switch (event.cbutton.button) { @@ -292,6 +297,9 @@ int Game::gameLoop() state = START; stateTimer = 0; stateVal = 0; + + } else if (state == FINISHED) { + loop = false; } break; @@ -361,7 +369,7 @@ int Game::gameLoop() case FINISHED: // Update updateWorld(t); - if(stateTimer>=5.0) + if(stateTimer>=20.0) loop = false; }