IEnumerator AfterInit(Action <int> process) { process(40); yield return(null); //加载游戏配置数据 Action onGameDataReady = () => { lock (MogoWorld.GameDataLocker) { MogoWorld.IsGameDataReady = true; if (MogoWorld.OnGameDataReady != null) { Driver.Invoke(MogoWorld.OnGameDataReady); } } }; GameDataControler.Init(null, onGameDataReady); process(45); yield return(null); //初始化网络模块 ServerProxy.Instance.Init(); ServerProxy.Instance.BackToChooseServer = MogoWorld.BackToChooseCharacter; process(50); yield return(null); //启动游戏逻辑 MogoWorld.Init(); SoundManager.Init(); MogoWorld.Start(); NPCManager.Init(); }