-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.lua
More file actions
31 lines (26 loc) · 784 Bytes
/
main.lua
File metadata and controls
31 lines (26 loc) · 784 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
scene_manager = require("src.scene.scene_manager")
assets = require("src.assets")
debug = require("src.core.debug")
local args_manager = require("src.args_manager")
-- Ces trois fonctions constituent la boucle principale du jeu
function love.load(args) -- loading the game
args_manager.start_scene(args)
if dev then
print("debug mod activated")
end
assets.preload()
scene_manager.load() -- start the scene set in arg manager
end
function love.update(dt)
scene_manager.update(dt)
if dev then
if love.keyboard.isDown("g") then
collectgarbage("collect")
print("garbage collected")
end
end
end
function love.draw() -- la partie graphique
scene_manager.draw()
if dev then debug.info() end
end