main.lua.txt 635 B

123456789101112131415161718192021222324252627282930
  1. local Main = {}
  2. local function LoadGlobalScript()
  3. require("Base/GlobalFunctions.lua")
  4. end
  5. function Main.Awake(luaRoot)
  6. CS.UnityEngine.Object.DontDestroyOnLoad(luaRoot)
  7. LoadGlobalScript()
  8. print("Main.Awake() Called ~")
  9. print("luaRoot.name -> " .. luaRoot.name)
  10. Main.luaRoot = luaRoot
  11. end
  12. function Main.Start(luaRoot)
  13. print("Main.Start Called ~")
  14. -- require("Base/UIHelper.lua"):OpenUI("UI/ZUILoginPanel.lua")
  15. require("Base/UIHelper.lua"):OpenUI("UI/MOD/ZUIMODPanel.lua")
  16. end
  17. function Main.OnDestroy()
  18. print("Main.OnDestroy Called ~")
  19. end
  20. print("main.lua Load Finish ... ...")
  21. return Main