master
Pascal Batty 2019-04-29 13:44:45 +02:00
parent d068315fff
commit 172a9bc756
1 changed files with 7 additions and 2 deletions

View File

@ -181,7 +181,7 @@ do -- Player
else self:stop()
end
if btnp(4) and self.vy == 0 then
sfx(2,54,15)
sfx(2,54,15,1)
self.vy = j
end
end
@ -557,7 +557,7 @@ function updateGame()
if isOnMarket() then
if btnp(5) then -- B (X key)
if currentState == GameState.game then sfx(1,68) end
if currentState == GameState.game then sfx(1,68,-1,3) end
currentState = GameState.market
end
end
@ -589,15 +589,19 @@ function updateMarket()
end
elseif btnp(4) then -- A (Z key)
if marketSelection == MarketOptions.blue then
if coinBlue > 0 then sfx(3,44,-1,1) end
life = life + math.floor(coinBlue*valueBlue)
coinBlue=0
elseif marketSelection == MarketOptions.red then
if coinRed > 0 then sfx(3,44,-1,1) end
life = life + math.floor(coinRed*valueRed)
coinRed=0
elseif marketSelection == MarketOptions.yellow then
if coinYellow > 0 then sfx(3,44,-1,1) end
life = life + math.floor(coinYellow*valueYellow)
coinYellow=0
elseif marketSelection == MarketOptions.all then
if (coinBlue + coinRed + coinYellow) > 0 then sfx(3,44,-1,1) end
life = life + math.floor(coinBlue*valueBlue)
life = life + math.floor(coinRed*valueRed)
life = life + math.floor(coinYellow*valueYellow)
@ -719,6 +723,7 @@ end
-- 000:0040004000a000a000f000f010f020f030f040f050f060f070f080f090f0a0f0b0f0c0f0d0f0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0400000000000
-- 001:01f011f021f031f041f061f081f0a1f0c1f0d1f0e1f0f1f0f100010001001100110011002100310041005100610071008100a100c100d100e100f100577000000000
-- 002:02000200020002101210122022303250428062a072d092f0b2f0d2f0e2f0f2f0f2f0f2f0f2f0f2f0f2f0f2f0f2f0f2f0f2f0f2f0f2f0f2f0f2f0f2f0415000000000
-- 003:0000002010401020204020603040406040805060608060a0708070a080c090a0a0c0c0e0c0c0d0e0e0f0e0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0301000000000
-- </SFX>
-- <PALETTE>