From 703d1e9f3ec07bcbf42e133e0bf30fca06cb10e2 Mon Sep 17 00:00:00 2001 From: Fabien Freling Date: Sat, 25 May 2019 17:19:18 +0200 Subject: [PATCH] wait 2 seconds before restart --- right_coin.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/right_coin.lua b/right_coin.lua index fb9fe92..87b3435 100644 --- a/right_coin.lua +++ b/right_coin.lua @@ -327,7 +327,7 @@ function drawGameOver() print("You survived for "..minutes.." minutes",70,50) print("and "..seconds.." seconds.",70,64) end - if t%120 > 20 then + if t > 120 and t%120 > 20 then print("Press",100,100) spr(401,132,98,0) end @@ -525,7 +525,7 @@ function update(state) elseif currentState == GameState.market then updateMarket() elseif currentState == GameState.gameover then - if btnp(4) then -- A (Z key) + if t > 120 and btnp(4) then -- A (Z key) currentState = GameState.start end end @@ -539,6 +539,7 @@ function updateGame() if life == 0 then sfx(4,20,130) currentState = GameState.gameover + t=0 return end if t%sickLapse == 0 then