X-Git-Url: http://git.purplebirdman.com/lightcycles-love.git/blobdiff_plain/275e7cac67f586378a29067b98a689ab5ac62ced..be5bdee30fbc4a013e7fd893548433670a5b908d:/main.lua diff --git a/main.lua b/main.lua index b4dd09c..69591dd 100644 --- a/main.lua +++ b/main.lua @@ -1,28 +1,25 @@ -- main +require 'scene' + function love.load() + scene:load() end function love.draw() - -- set bg - love.graphics.setBackgroundColor(0.2, 0.2, 0.5) - - -- draw basic grid - local width = love.graphics.getWidth() - local height = love.graphics.getHeight() - local delta = 50 - - for x=0,width,delta do - love.graphics.line(x, 0, x, height) - end - - for y=0,height,delta do - love.graphics.line(0, y, width, y) - end + scene:draw() end function love.update(dt) if love.keyboard.isDown('escape') then love.event.quit() end + if not scene.paused then + scene:update(dt) + end +end + +function love.quit() + print('Thanks for playing!') + scene:quit() end