Entry.cs 505 B

123456789101112131415161718192021222324252627
  1. using System;
  2. namespace ET
  3. {
  4. public static class Entry
  5. {
  6. public static void Start()
  7. {
  8. try
  9. {
  10. CodeLoader.Instance.Update += Game.Update;
  11. CodeLoader.Instance.LateUpdate += Game.LateUpdate;
  12. CodeLoader.Instance.OnApplicationQuit += Game.Close;
  13. Game.EventSystem.Add(CodeLoader.Instance.GetHotfixTypes());
  14. ProtobufHelper.Init();
  15. Game.EventSystem.Publish(new EventType.AppStart()).Coroutine();
  16. }
  17. catch (Exception e)
  18. {
  19. Log.Error(e);
  20. }
  21. }
  22. }
  23. }