void DoUserLogout() { ChannelMgr.UpdateLogoutSrc(); //if (ChannelMgr.LogoutSrc == LogOutSrc.EnterGame) //{ // Debug.Log("onLogoutSuccess:Login"); // ChannelMgr.Login(); //} //else if (ChannelMgr.LogoutSrc == LogOutSrc.CreateRole) //{ // Panel_CreateRole panel = (Panel_CreateRole)UIMgr.Instance.GetPanelScript(EUIPanelID.Panel_CreateRole); // if (panel != null) // panel.OnBackClick(); // else // yxyLog.LogError("PanelCreateRole is null"); // ChannelMgr.Login(); //} //else if (ChannelMgr.LogoutSrc == LogOutSrc.ChooseRole) //{ // Panel_ChooseRole panel = (Panel_ChooseRole)UIMgr.Instance.GetPanelScript(EUIPanelID.Panel_ChooseRole); // if (panel != null) // panel.ReturnToServerSelect(); // else // yxyLog.LogError("Panel_ChooseRole is null"); // ChannelMgr.Login(); //} //else //{ // //很诡异的bug,必须启用协程,否则切换账号会崩溃!可能是7kSDK的bug // StartCoroutine(SwitchAccountCoroutinue(true)); //} }
void onSwitchUsered(string msg) { //yxyLog.Log("onSwitchUsered: " + msg); //GameConfig.Username = Platform.GetInstance().Plat_GetUid(); ChannelMgr.UpdateLogoutSrc(); //if (ChannelMgr.LogoutSrc == LogOutSrc.InGame) //{ // StartCoroutine(SwitchAccountCoroutinue(true)); //} }
static int UpdateLogoutSrc(IntPtr L) { try { ToLua.CheckArgsCount(L, 0); ChannelMgr.UpdateLogoutSrc(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }