-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.lua
More file actions
58 lines (44 loc) · 928 Bytes
/
main.lua
File metadata and controls
58 lines (44 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
function love.load()
math.randomseed(os.time())
d1 = 0
d2 = 0
colliderToggle = false
require("src/startup/gameStart")
gameStart()
--createNewSave()
dj.volume("effect", 1)
end
function love.update(dt)
updateAll(dt)
end
function love.draw()
drawBeforeCamera()
cam:attach()
drawCamera()
cam:detach()
drawAfterCamera()
--debug:d()
--debug:single()
end
function love.keypressed(key)
if key == 'escape' then
love.event.quit()
end
end
function love.mousepressed(x, y, button)
if button == 1 then
mouse:leftClick()
if gamestate == 0 then
menu.levelSelect = true
dj.play(sounds.click, "static", "effect")
end
end
if button == 2 then
mouse:rightClick()
end
end
function love.mousereleased(x, y, button)
if button == 1 then
mouse:releaseLeft()
end
end