add B indicator when on market
This commit is contained in:
parent
5b83b19bcc
commit
36ed7f89cc
|
@ -267,6 +267,9 @@ function drawGame()
|
||||||
v:draw()
|
v:draw()
|
||||||
end
|
end
|
||||||
drawLife(0,0,0)
|
drawLife(0,0,0)
|
||||||
|
if isOnMarket() then
|
||||||
|
spr(385, 14.5*8, 6*8)
|
||||||
|
end
|
||||||
|
|
||||||
-- Coins / market
|
-- Coins / market
|
||||||
local coinsOff=110
|
local coinsOff=110
|
||||||
|
@ -433,6 +436,10 @@ function update(state)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function isOnMarket()
|
||||||
|
return mget(p.x/s,p.y/s) == 48 or mget(p.x/s,p.y/s) == 49
|
||||||
|
end
|
||||||
|
|
||||||
function updateGame()
|
function updateGame()
|
||||||
if life == 0 then
|
if life == 0 then
|
||||||
currentState = GameState.gameover
|
currentState = GameState.gameover
|
||||||
|
@ -444,7 +451,7 @@ function updateGame()
|
||||||
p:direct()
|
p:direct()
|
||||||
p:update()
|
p:update()
|
||||||
|
|
||||||
if mget(p.x/s,p.y/s) == 48 or mget(p.x/s,p.y/s) == 49 then
|
if isOnMarket() then
|
||||||
if btnp(5) then -- B (X key)
|
if btnp(5) then -- B (X key)
|
||||||
currentState = GameState.market
|
currentState = GameState.market
|
||||||
end
|
end
|
||||||
|
@ -555,6 +562,7 @@ end
|
||||||
-- 098:000ee00000ee990000ee9e0000ee9e0000ee9e0000ee9e0000ee9900000ee000
|
-- 098:000ee00000ee990000ee9e0000ee9e0000ee9e0000ee9e0000ee9900000ee000
|
||||||
-- 099:000ee000009ee900009ee900009ee900009ee900009ee900009ee900000ee000
|
-- 099:000ee000009ee900009ee900009ee900009ee900009ee900009ee900000ee000
|
||||||
-- 100:000ee0000099ee0000e9ee0000e9ee0000e9ee0000e9ee000099ee00000ee000
|
-- 100:000ee0000099ee0000e9ee0000e9ee0000e9ee0000e9ee000099ee00000ee000
|
||||||
|
-- 129:0a66aaa0aa6a6aaaaa6666aaaa6aa6aa3a6666a303aaaa30003aa30000033000
|
||||||
-- </SPRITES>
|
-- </SPRITES>
|
||||||
|
|
||||||
-- <MAP>
|
-- <MAP>
|
||||||
|
|
Loading…
Reference in a new issue