Skip to content

Instantly share code, notes, and snippets.

@keomamallett
Created April 20, 2019 17:38
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 keomamallett/1e4cfcf17ad2a88fd5ad4cab2222fc76 to your computer and use it in GitHub Desktop.
Save keomamallett/1e4cfcf17ad2a88fd5ad4cab2222fc76 to your computer and use it in GitHub Desktop.
This was created to share Lua code with my first student
function love.load()
x = 100
y = 100
width = 200
height = 150
speed = 75
end
function love.draw()
love.graphics.rectangle("line", x, y, width, height)
end
function love.update(dt)
print(dt)
x = x + (speed * dt)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment