all btns
This commit is contained in:
parent
3e773eba54
commit
9ccf995c64
3 changed files with 7 additions and 4 deletions
|
@ -163,8 +163,11 @@ end
|
|||
function updatePlayer()
|
||||
playdate.timer.updateTimers()
|
||||
sprRocket:setImage(imgRocket)
|
||||
|
||||
local inp = (playdate.buttonIsPressed(playdate.kButtonUp) or playdate.buttonIsPressed(playdate.kButtonDown) or playdate.buttonIsPressed(playdate.kButtonLeft) or playdate.buttonIsPressed(playdate.kButtonRight) or playdate.buttonIsPressed(playdate.kButtonA) or playdate.buttonIsPressed(playdate.kButtonB))
|
||||
|
||||
if active == true then
|
||||
if playdate.buttonIsPressed(playdate.kButtonUp) or playdate.buttonIsPressed(playdate.kButtonA) then
|
||||
if inp then
|
||||
velocity.x = velocity.x + math.sin(math.rad(playdate.getCrankPosition())) /2
|
||||
velocity.y = velocity.y - math.cos(math.rad(playdate.getCrankPosition())) /2
|
||||
end
|
||||
|
@ -184,7 +187,7 @@ function updatePlayer()
|
|||
end
|
||||
|
||||
elseif exists == true then
|
||||
if (playdate.buttonJustPressed(playdate.kButtonUp) or playdate.buttonJustPressed(playdate.kButtonA)) and playdate.isCrankDocked() == false then
|
||||
if inp and playdate.isCrankDocked() == false then
|
||||
active = true
|
||||
end
|
||||
local cx, cy = gfx.getDrawOffset()
|
||||
|
@ -207,7 +210,7 @@ function updatePlayer()
|
|||
|
||||
sprRocket:setRotation(playdate.getCrankPosition())
|
||||
|
||||
if active and (playdate.buttonIsPressed(playdate.kButtonA) or playdate.buttonIsPressed(playdate.kButtonUp)) then
|
||||
if active and inp then
|
||||
sprRocket:setImage(loopFire:image())
|
||||
end
|
||||
end
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
|
@ -3,6 +3,6 @@ author=PossiblyAxolotl
|
|||
description=Help a crew of rockets collect energy to get back home!
|
||||
bundleID=com.PossiblyAxolotl.RocketBytes
|
||||
launchSoundPath=launcher/rocketing
|
||||
version=1.1.2
|
||||
version=1.1.3
|
||||
buildNumber=1
|
||||
imagePath=launcher
|
Loading…
Reference in a new issue