Compare commits
2 commits
ldjam-44-s
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
703d1e9f3e | ||
|
dc86738464 |
1 changed files with 4 additions and 3 deletions
|
@ -327,7 +327,7 @@ function drawGameOver()
|
||||||
print("You survived for "..minutes.." minutes",70,50)
|
print("You survived for "..minutes.." minutes",70,50)
|
||||||
print("and "..seconds.." seconds.",70,64)
|
print("and "..seconds.." seconds.",70,64)
|
||||||
end
|
end
|
||||||
if t%120 > 20 then
|
if t > 120 and t%120 > 20 then
|
||||||
print("Press",100,100)
|
print("Press",100,100)
|
||||||
spr(401,132,98,0)
|
spr(401,132,98,0)
|
||||||
end
|
end
|
||||||
|
@ -525,7 +525,7 @@ function update(state)
|
||||||
elseif currentState == GameState.market then
|
elseif currentState == GameState.market then
|
||||||
updateMarket()
|
updateMarket()
|
||||||
elseif currentState == GameState.gameover then
|
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
|
currentState = GameState.start
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -539,6 +539,7 @@ function updateGame()
|
||||||
if life == 0 then
|
if life == 0 then
|
||||||
sfx(4,20,130)
|
sfx(4,20,130)
|
||||||
currentState = GameState.gameover
|
currentState = GameState.gameover
|
||||||
|
t=0
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if t%sickLapse == 0 then
|
if t%sickLapse == 0 then
|
||||||
|
@ -549,7 +550,7 @@ function updateGame()
|
||||||
secondsAlive = secondsAlive + 1
|
secondsAlive = secondsAlive + 1
|
||||||
end
|
end
|
||||||
if sickCounter==0 and sickLapse>1 then
|
if sickCounter==0 and sickLapse>1 then
|
||||||
sickLapse=math.max(sickLapse-5,1)
|
sickLapse=math.max(sickLapse-2,1)
|
||||||
sickCounter=20
|
sickCounter=20
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue