Entry.cs 484 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. Game.EventSystem.Add(typeof(Entry).Assembly);
  11. CodeLoader.Instance.Update = Game.Update;
  12. CodeLoader.Instance.LateUpdate = Game.LateUpdate;
  13. CodeLoader.Instance.OnApplicationQuit = Game.Close;
  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. }