-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.lua
More file actions
47 lines (36 loc) · 1.05 KB
/
main.lua
File metadata and controls
47 lines (36 loc) · 1.05 KB
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
love.filesystem.load("src/Components/Initialization/Run.lua")()
love.filesystem.load("src/Components/Initialization/ErrorHandler.lua")()
AssetHandler = require("src.Components.Helpers.AssetManager")()
VERSION = {
ENGINE = "0.0.1",
FORMATS = "0.0.1"
}
function love.initialize(args)
eventManager = require 'src.Components.Modules.EventManager'
--eventManager.init()
slab.Initialize({"NoDocks"})
curslot = neuron.new("game")
curslot.save.game = {}
AssetHandler:init()
registers = {
states = {
}
}
local states = love.filesystem.getDirectoryItems("src/States")
for s = 1, #states, 1 do
require("src.States." .. states[s]:gsub(".lua", ""))
end
if DEBUG_APP then
love.filesystem.createDirectory("editor")
love.filesystem.createDirectory("editor/maps")
end
gamestate.registerEvents()
gamestate.switch(EditorState)
end
function love.keypressed(k)
if DEBUG_APP then
if k == "f12" then
gamestate.switch(EditorState)
end
end
end