Entry.cs 523 B

1234567891011121314151617181920212223242526272829
  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.Options = new Options();
  16. Game.EventSystem.Publish(new EventType.AppStart()).Coroutine();
  17. }
  18. catch (Exception e)
  19. {
  20. Log.Error(e);
  21. }
  22. }
  23. }
  24. }