namespace ET
{
    namespace EventType
    {
        public class EntryLoadCfg
        {
        }

        public class EntryEvent1
        {
        }

        public class EntryEvent2
        {
        }

        public class 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.PublishWait<EventType.EntryLoadCfg>();

            await EventSystem.Instance.PublishWait<EventType.EntryEvent1>();
            await EventSystem.Instance.PublishWait<EventType.EntryEvent2>();
            await EventSystem.Instance.PublishWait<EventType.EntryEvent3>();
        }
    }
}