]> Untitled Git - lightcycles-love.git/blob - main.lua
b4dd09cfb30ff9a5cba51596a5410b7f9b3fc4bf
[lightcycles-love.git] / main.lua
1 -- main
2
3 function love.load()
4 end
5
6 function love.draw()
7     -- set bg
8     love.graphics.setBackgroundColor(0.2, 0.2, 0.5)
9
10     -- draw basic grid
11     local width = love.graphics.getWidth()
12     local height = love.graphics.getHeight()
13     local delta = 50
14
15     for x=0,width,delta do
16         love.graphics.line(x, 0, x, height)
17     end
18
19     for y=0,height,delta do
20         love.graphics.line(0, y, width, y)
21     end
22 end
23
24 function love.update(dt)
25     if love.keyboard.isDown('escape') then
26         love.event.quit()
27     end
28 end