HotUpdateEntry.cs 901 B

123456789101112131415161718192021222324252627282930313233343536
  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. //ET
  14. try
  15. {
  16. Screen.sleepTimeout = SleepTimeout.NeverSleep;
  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. GameController.Init().Coroutine();
  28. }
  29. }
  30. }