-
-
Save videlais/fdfe10f50f4ba0204a26c81ff0d0cd2d to your computer and use it in GitHub Desktop.
keyboard.lua code block
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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