enter hospital
This commit is contained in:
parent
59c0a5eeb4
commit
3db348d4d3
|
@ -429,16 +429,19 @@ function updateGame()
|
||||||
if t%20 ==0 then
|
if t%20 ==0 then
|
||||||
life=life-1
|
life=life-1
|
||||||
end
|
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)
|
if btnp(4) then -- A (Z key)
|
||||||
currentState = GameState.market
|
currentState = GameState.market
|
||||||
end
|
end
|
||||||
if btnp(5) then -- B (X key)
|
|
||||||
currentState = GameState.gameover
|
|
||||||
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 coinTimer=coinTimer-1 end
|
||||||
if coinTimer == 0 then addRandomCoin() end
|
if coinTimer == 0 then addRandomCoin() end
|
||||||
p:direct()
|
|
||||||
p:update()
|
|
||||||
|
|
||||||
-- Coin market
|
-- Coin market
|
||||||
valueBlue=math.floor((math.sin(t/200)+1)*50)/10
|
valueBlue=math.floor((math.sin(t/200)+1)*50)/10
|
||||||
|
|
Loading…
Reference in a new issue