You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Playdate functions playdate.buttonIsPressed(), buttonJustPressed, buttonJustReleased are case-insensitive.
For example this snippet from the "2020":
if playdate.buttonIsPressed("UP") then
dy = -4
elseif playdate.buttonIsPressed("DOWN") then
dy = 4
end
if playdate.buttonIsPressed("LEFT") then
dx = -4
elseif playdate.buttonIsPressed("RIGHT") then
dx = 4
end
Constants kButtonUp, kButtonDown etc. must be integers and not strings.
Function playdate.getButtonState() must return the state of all buttons as three bit flag values (current, pressed, released).
playdate.buttonIsPressed(),buttonJustPressed,buttonJustReleasedare case-insensitive.For example this snippet from the "2020":
kButtonUp,kButtonDownetc. must be integers and not strings.playdate.getButtonState()must return the state of all buttons as three bit flag values (current, pressed, released).