Extend scoreboard duration, continue by return/A
This commit is contained in:
parent
e9ea95d3b9
commit
0441ff72c3
1 changed files with 11 additions and 3 deletions
10
src/game.cpp
10
src/game.cpp
|
|
@ -282,8 +282,13 @@ int Game::gameLoop()
|
||||||
#endif
|
#endif
|
||||||
} else if(event.type == SDL_KEYUP)
|
} else if(event.type == SDL_KEYUP)
|
||||||
{
|
{
|
||||||
|
if (state == FINISHED && event.key.keysym.sym == SDLK_RETURN) {
|
||||||
|
loop = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
// handle player controls
|
// handle player controls
|
||||||
updateControls(event.key.keysym.sym, false);
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue