A button jumps, B button opens market
This commit is contained in:
parent
0d42135358
commit
9904cfc9b8
|
@ -156,7 +156,7 @@ do -- Player
|
||||||
self.isFlipped = false
|
self.isFlipped = false
|
||||||
else self.vx = 0
|
else self.vx = 0
|
||||||
end
|
end
|
||||||
if btnp(0) and self.vy == 0 then self.vy = j end
|
if btnp(4) and self.vy == 0 then self.vy = j end
|
||||||
end
|
end
|
||||||
|
|
||||||
function Player:update()
|
function Player:update()
|
||||||
|
@ -433,7 +433,7 @@ function updateGame()
|
||||||
p:update()
|
p:update()
|
||||||
|
|
||||||
if mget(p.x/s,p.y/s) == 48 or mget(p.x/s,p.y/s) == 49 then
|
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(5) then -- B (X key)
|
||||||
currentState = GameState.market
|
currentState = GameState.market
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue