1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- namespace ET
- {
- namespace EventType
- {
- public struct EntryLoadCfg
- {
- }
- public struct EntryEvent1
- {
- }
- public struct EntryEvent2
- {
- }
- public struct EntryEvent3
- {
- }
- }
- public static class Entry
- {
- public static void Init()
- {
- }
- public static void Start()
- {
- StartAsync().Coroutine();
- }
- private static async ETTask StartAsync()
- {
- Log.Debug("Entry start");
- WinPeriod.Init();
- MongoHelper.Init();
- ProtobufHelper.Init();
- Game.AddSingleton<NetServices>();
- Game.AddSingleton<Root>();
- await EventSystem.Instance.PublishAsync(Root.Instance.Scene, new EventType.EntryLoadCfg());
- await EventSystem.Instance.PublishAsync(Root.Instance.Scene, new EventType.EntryEvent1());
- await EventSystem.Instance.PublishAsync(Root.Instance.Scene, new EventType.EntryEvent2());
- await EventSystem.Instance.PublishAsync(Root.Instance.Scene, new EventType.EntryEvent3());
- }
- }
- }
|