if action_id == hash("up") then
position.y = position.y + 1
if action.pressed then
sprite.play_flipbook("#player", "up", function() os.exit() end)
elseif action.released then
sprite.play_flipbook("#player", "idle-up", function() os.exit() end)
end
I’m using this judgment for playback now and it works but it’s not elegant, is there another way?