Extend scoreboard duration, continue by return/A

This commit is contained in:
Jakub Skokan 2016-07-13 09:33:03 +02:00
parent e9ea95d3b9
commit 0441ff72c3

View file

@ -282,8 +282,13 @@ int Game::gameLoop()
#endif #endif
} else if(event.type == SDL_KEYUP) } else if(event.type == SDL_KEYUP)
{ {
// handle player controls if (state == FINISHED && event.key.keysym.sym == SDLK_RETURN) {
updateControls(event.key.keysym.sym, false); loop = false;
} else {
// handle player controls
updateControls(event.key.keysym.sym, false);
}
} else if (event.type == SDL_CONTROLLERBUTTONUP) { } else if (event.type == SDL_CONTROLLERBUTTONUP) {
switch (event.cbutton.button) { switch (event.cbutton.button) {
@ -292,6 +297,9 @@ int Game::gameLoop()
state = START; state = START;
stateTimer = 0; stateTimer = 0;
stateVal = 0; stateVal = 0;
} else if (state == FINISHED) {
loop = false;
} }
break; break;
@ -361,7 +369,7 @@ int Game::gameLoop()
case FINISHED: case FINISHED:
// Update // Update
updateWorld(t); updateWorld(t);
if(stateTimer>=5.0) if(stateTimer>=20.0)
loop = false; loop = false;
} }