Created
October 20, 2013 22:11
-
-
Save TheNorthEestern/7076005 to your computer and use it in GitHub Desktop.
movement code
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
function love.update(dt) | |
if love.keyboard.isDown('d') then | |
x = x + 100 * dt | |
end | |
if love.keyboard.isDown('a') then | |
x = x - 100 * dt | |
end | |
if love.keyboard.isDown('w') then | |
y = y - 1 * dt | |
end | |
if love.keyboard.isDown('s') then | |
y = y + 1 * dt | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment