private void OnLoginSuccess() { GlobalEvent.onLoginSuccess -= OnLoginSuccess; //隐藏登录界面 AppLoginPanel.Hide(); //直接初始化业务层模块 //ModuleManager.Instance.CreateModule(ModuleDef.HomeModule); //ModuleManager.Instance.CreateModule(ModuleDef.PVEModule); //ModuleManager.Instance.CreateModule(ModuleDef.PVPModule); //ModuleManager.Instance.CreateModule(ModuleDef.RoomModule); //ModuleManager.Instance.CreateModule(ModuleDef.GameModule); //ModuleManager.Instance.ShowModule(ModuleDef.HomeModule); //通过ILRScript来启动业务模块 bool ret = (bool)ILRManager.Instance.Invoke("Snaker.ScriptMain", "Init"); if (!ret) { UIAPI.ShowMsgBox("初始化失败", "初始化热更业务模块", "确定", (arg) => { AppLoginPanel.Show(); }); } }
private void OnLoginFailed(int code, string info) { GlobalEvent.onLoginFailed -= OnLoginFailed; AppLoginPanel.Hide(); UIAPI.ShowMsgBox("登录失败", info, "确定", (arg) => { AppLoginPanel.Show(); }); //显示失败信息 }