Skip to content

Instantly share code, notes, and snippets.

@videlais

videlais/main.lua Secret

Created Apr 12, 2018
Embed
What would you like to do?
Updated main.lua
require("player")
function love.load()
-- A meter will be 64px
love.physics.setMeter(64)
-- Set the X gravity, Y gravity, and if objects can sleep
world = love.physics.newWorld( 0, 0, true )
-- Send the world to the player so that it will be also be in the "world"
player = Player(world)
end
function love.update(dt)
-- Feed the world the current delta time (dt)
world:update(dt)
-- Update the player object
player:update()
end
function love.draw()
-- Draw the player object
player:draw()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.