]> Untitled Git - lightcycles-love.git/blobdiff - main.lua
Increased player speed
[lightcycles-love.git] / main.lua
index b4dd09cfb30ff9a5cba51596a5410b7f9b3fc4bf..a0d0ca720923f8ec71259c9fa99719cc6b59c3d4 100644 (file)
--- a/main.lua
+++ b/main.lua
@@ -1,28 +1,23 @@
 -- main
 
 -- main
 
+require 'scene'
+
 function love.load()
 function love.load()
+    scene:load()
 end
 
 function love.draw()
 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
 end
 
 function love.update(dt)
     if love.keyboard.isDown('escape') then
         love.event.quit()
     end
+    scene:update(dt)
+end
+
+function love.quit()
+    print('Thanks for playing!')
+    scene:quit()
 end
 end