Commit 3b5a87ce authored by Samuel Germain (sjg970)'s avatar Samuel Germain (sjg970)
Browse files

Add new file (Camera.lua)

parent 18e43ab2
Camera = {
x = 0,
y = 0
}
function Camera.update(dt)
if love.keyboard.isDown("right") then --RIGHT ARROW BUTTON IS DOWN then
Camera.x = Camera.x + 5
elseif love.keyboard.isDown("left") then
Camera.x = Camera.x - 5
end
if love.keyboard.isDown("up") then
Camera.y = Camera.y - 5
elseif love.keyboard.isDown("down") then
Camera.y = Camera.y + 5
end
end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment