DemoMain.lua.txt 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. local DemoMain = {}
  2. local function LoadGlobalScript()
  3. require("Base/GlobalFunctions.lua")
  4. end
  5. function DemoMain.Awake(luaRoot)
  6. CS.UnityEngine.Object.DontDestroyOnLoad(luaRoot)
  7. LoadGlobalScript()
  8. print("DemoMain.Awake() Called ~")
  9. print("luaRoot.name -> " .. luaRoot.name)
  10. DemoMain.luaRoot = luaRoot
  11. end
  12. function DemoMain.Start(luaRoot)
  13. print("DemoMain.Start Called ~")
  14. require("Base/UIHelper.lua"):OpenUI("CommonUtils/UINavigator/UINavigator.lua")
  15. require("Base/UIHelper.lua"):OpenUI("CommonUtils/DemoLuaScripts/DemoAll.lua")
  16. -- require("Base/UIHelper.lua"):OpenUI("CommonUtils/DemoLuaScripts/DemoProgressor.lua")
  17. -- require("Base/UIHelper.lua"):OpenUI("CommonUtils/DemoLuaScripts/DemoRemoteReturn.lua")
  18. -- require("Base/UIHelper.lua"):OpenUI("CommonUtils/DemoLuaScripts/DemoToast.lua")
  19. -- require("Base/UIHelper.lua"):OpenUI("CommonUtils/DemoLuaScripts/DemoMenu.lua")
  20. -- require("Base/UIHelper.lua"):OpenUI("CommonUtils/DemoLuaScripts/DemoPage.lua")
  21. -- require("Base/UIHelper.lua"):OpenUI("CommonUtils/DemoLuaScripts/DemoPagePoster.lua")
  22. end
  23. function DemoMain.OnDestroy()
  24. print("DemoMain.OnDestroy Called ~")
  25. end
  26. print("DemoMain.lua Load Finish ... ...")
  27. return DemoMain