Entry.cs 814 B

12345678910111213141516171819202122232425262728293031323334
  1. namespace ET
  2. {
  3. namespace EventType
  4. {
  5. public struct EntryEvent1
  6. {
  7. }
  8. public struct EntryEvent2
  9. {
  10. }
  11. public struct EntryEvent3
  12. {
  13. }
  14. }
  15. public static class Entry
  16. {
  17. public static void Start()
  18. {
  19. StartAsync().Coroutine();
  20. }
  21. private static async ETTask StartAsync()
  22. {
  23. MongoRegister.Init();
  24. await EventSystem.Instance.PublishAsync(Root.Instance.Scene, new EventType.EntryEvent1());
  25. await EventSystem.Instance.PublishAsync(Root.Instance.Scene, new EventType.EntryEvent2());
  26. await EventSystem.Instance.PublishAsync(Root.Instance.Scene, new EventType.EntryEvent3());
  27. }
  28. }
  29. }