Entry.cs 461 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.GetTypes());
  14. Game.EventSystem.Publish(new EventType.AppStart());
  15. }
  16. catch (Exception e)
  17. {
  18. Log.Error(e);
  19. }
  20. }
  21. }
  22. }