]> Untitled Git - lightcycles-love.git/blob - main.lua
Added collision detection and pause on crash
[lightcycles-love.git] / main.lua
1 -- main
2
3 require 'scene'
4
5 function love.load()
6     scene:load()
7 end
8
9 function love.draw()
10     scene:draw()
11 end
12
13 function love.update(dt)
14     if love.keyboard.isDown('escape') then
15         love.event.quit()
16     end
17     if not scene.paused then
18         scene:update(dt)
19     end
20 end
21
22 function love.quit()
23     print('Thanks for playing!')
24     scene:quit()
25 end