-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.lua
61 lines (42 loc) · 908 Bytes
/
main.lua
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
59
60
61
G = require "gameState"
lg = love.graphics
Scenes = {
TITLE = 1,
INTRO = 2,
RUNES = 3,
ANIMALS = 4,
HELP = 5,
PROGRESS = 6,
GAMEOVER = 7
}
local debug
soundOff = false
DBTXT = ""
function love.load()
debug = false
CurrentScene = Scenes.TITLE
if debug == true then
CurrentScene = Scenes.ANIMALS
end
G.load(debug)
end
function love.update()
G.update()
end
function love.draw()
G.draw()
love.graphics.reset()
if debug == true then
love.graphics.setColor(0,0,0,1)
local x, y = love.mouse.getPosition()
love.graphics.printf(x..", "..y, x-10, y-10, 100, "left")
love.graphics.printf(DBTXT, 0, 0, 100, "left")
love.graphics.reset()
end
end
function love.mousereleased(x, y, _, _, _)
G.handleMouseClick(x, y)
end
function love.keyreleased(key)
G.keyreleased(key, debug)
end