Entry.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System.Timers;
  2. using ICSharpCode.SharpZipLib.Zip;
  3. namespace ET
  4. {
  5. namespace EventType
  6. {
  7. public struct EntryEvent1
  8. {
  9. }
  10. public struct EntryEvent2
  11. {
  12. }
  13. public struct EntryEvent3
  14. {
  15. }
  16. }
  17. public static class Entry
  18. {
  19. public static void Start()
  20. {
  21. StartAsync().Coroutine();
  22. }
  23. private static async ETTask StartAsync()
  24. {
  25. WinPeriod.Init();
  26. MongoRegister.Init();
  27. Game.AddSingleton<NetServices>();
  28. Game.AddSingleton<Root>();
  29. await Game.AddSingleton<ConfigComponent>().LoadAsync();
  30. await EventSystem.Instance.PublishAsync(Root.Instance.Scene, new EventType.EntryEvent1());
  31. await EventSystem.Instance.PublishAsync(Root.Instance.Scene, new EventType.EntryEvent2());
  32. await EventSystem.Instance.PublishAsync(Root.Instance.Scene, new EventType.EntryEvent3());
  33. }
  34. }
  35. }