-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.lua
More file actions
35 lines (29 loc) · 706 Bytes
/
Copy pathmain.lua
File metadata and controls
35 lines (29 loc) · 706 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
require("debugger")
local camera = require("src.engine.camera")
local gui = require("src.engine.gui")
local scenes = require("src.scenes")
local shared = require("src.shared")
function love.load()
scenes:switch(scenes.game)
end
function love.draw()
scenes:call("draw")
gui:draw()
end
function love.update(deltaTime)
shared.world:update(deltaTime)
scenes:call("update", deltaTime)
end
function love.resize(w, h)
camera:resize(w, h)
end
function love.keypressed(key)
if key == "z" then
print(collectgarbage("count"))
end
if key == "escape" then
scenes:switch(scenes.menu)
elseif key == "return" then
scenes:switch(scenes.game)
end
end