enter hospital

master
Fabien Freling 2019-04-28 18:04:44 +02:00
parent 59c0a5eeb4
commit 3db348d4d3
1 changed files with 11 additions and 8 deletions

View File

@ -429,17 +429,20 @@ function updateGame()
if t%20 ==0 then
life=life-1
end
if btnp(4) then -- A (Z key)
currentState = GameState.market
end
if btnp(5) then -- B (X key)
currentState = GameState.gameover
end
if coinTimer>0 then coinTimer=coinTimer-1 end
if coinTimer == 0 then addRandomCoin() end
p:direct()
p:update()
if mget(p.x/s,p.y/s) == 48 or mget(p.x/s,p.y/s) == 49 then
if btnp(4) then -- A (Z key)
currentState = GameState.market
end
end
-- if btnp(5) then -- B (X key)
-- currentState = GameState.gameover
-- end
if coinTimer>0 then coinTimer=coinTimer-1 end
if coinTimer == 0 then addRandomCoin() end
-- Coin market
valueBlue=math.floor((math.sin(t/200)+1)*50)/10
if t%60 == 0 then