Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@videlais
Created April 9, 2018 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save videlais/fdfe10f50f4ba0204a26c81ff0d0cd2d to your computer and use it in GitHub Desktop.
Save videlais/fdfe10f50f4ba0204a26c81ff0d0cd2d to your computer and use it in GitHub Desktop.
keyboard.lua code block
if love.keyboard.isDown("up") then
player.y = player.y - 20
end
if love.keyboard.isDown("down") then
player.y = player.y + 20
end
if love.keyboard.isDown("left") then
player.x = player.x - 20
end
if love.keyboard.isDown("right") then
player.x = player.x + 20
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment