-
-
Save videlais/fb71814d8cbb46ab2b7604c40d3efd04 to your computer and use it in GitHub Desktop.
Updated main.lua
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
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