场景&事件系统重写

This commit is contained in:
MrZ626
2020-12-04 19:35:33 +08:00
parent 0b2abf71ea
commit 8a754431cf
48 changed files with 546 additions and 352 deletions

View File

@@ -133,7 +133,10 @@ end
--Load scene files from SOURCE ONLY
for _,v in next,fs.getDirectoryItems("parts/scenes")do
if fs.getRealDirectory("parts/scenes/"..v)~=SAVEDIR then
require("parts/scenes/"..v:sub(1,-5))
local sceneName=v:sub(1,-5)
local scene=require("parts/scenes/"..sceneName)
SCN.add(sceneName,scene)
if scene.widgetList then WIDGET.init(sceneName,scene.widgetList)end
else
LOG.print("Dangerous file : %SAVE%/parts/scenes/"..v)
end