HotUpdateEntry.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using Assets.Game.Launcher.HotUpdateProxy;
  2. using ET;
  3. using FairyGUI;
  4. using System;
  5. using UnityEngine;
  6. namespace GFGGame.HotUpdate
  7. {
  8. public class HotUpdateEntry
  9. {
  10. public static void Start()
  11. {
  12. VEngine.Logger.Loggable = false;
  13. Debug.Log("HotUpdateEntry Start");
  14. //ET
  15. try
  16. {
  17. HotUpdateProxy.Instance.update = Game.Update;
  18. HotUpdateProxy.Instance.lateUpdate = Game.LateUpdate;
  19. HotUpdateProxy.Instance.onApplicationQuit = Game.Close;
  20. Game.EventSystem.Add(HotUpdateCodeLoader.Instance.GetTypes());
  21. Game.EventSystem.Publish(new ET.EventType.AppStart());
  22. }
  23. catch (Exception e)
  24. {
  25. Log.Error(e);
  26. }
  27. ViewManager.Init();
  28. //日志
  29. LogController.Instance.Init();
  30. //全局
  31. GameGlobal.Init();
  32. //缓存
  33. LocalCache.InitLocalData();
  34. //sqlite
  35. SqliteController.Instance.Init(false, ResPathUtil.SQLITE_FILE_PATH);
  36. //开始游戏
  37. GameController.Start();
  38. Debug.Log("HotUpdateEntry Start completed");
  39. }
  40. }
  41. }