Entry.cs 787 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. MongoRegister.Init();
  20. StartAsync().Coroutine();
  21. }
  22. private static async ETTask StartAsync()
  23. {
  24. await EventSystem.Instance.PublishAsync(Game.Scene, new EventType.EntryEvent1());
  25. await EventSystem.Instance.PublishAsync(Game.Scene, new EventType.EntryEvent2());
  26. await EventSystem.Instance.PublishAsync(Game.Scene, new EventType.EntryEvent3());
  27. }
  28. }
  29. }