Ejemplo n.º 1
0
    public void PPLogout()
    {
        LoginTokenKey = "";
        HTTPClientAPI.cleanSessionId();
        //reset login当前菜单为splahcontroller
        LoginLogic.needResetLogin  = true;
        MainUILogic.needResetLogin = true;
        //清除临时切换数据
        //update
        //Obj_MyselfPlayer.GetMe().updateHeroItem = null;
        //Obj_MyselfPlayer.GetMe().updateMaterialItems = new UserCardItem[6];
        //evolution
        Obj_MyselfPlayer.GetMe().evolutionHeroItem      = null;
        Obj_MyselfPlayer.GetMe().evolutionMaterialItems = new UserCardItem[5];
        //strengthen
        Obj_MyselfPlayer.GetMe().strengthenHeroItem = null;

        Obj_MyselfPlayer.ReleaseMe();

        //清空新手引导状态
        GuideManager.Instance.guideTimeOut();
        //NetworkSender.Instance().Login(LoginDone, AccountManager.Instance.GetLoginAccountID());
        //回到主菜单
        GameManager.Instance.LoadLevel(Utils.UI_NAME_Login);
    }
    //王明磊 返回登录
    public void OnReturnToLogin()
    {
//		GameManager.Instance.LoadLevel(Utils.UI_NAME_Login);
        //清空session id
        HTTPClientAPI.cleanSessionId();
        //reset login当前菜单为splahcontroller
        LoginLogic.needResetLogin  = true;
        MainUILogic.needResetLogin = true;
        //清除临时切换数据
        //update
        //Obj_MyselfPlayer.GetMe().updateHeroItem = null;
        //Obj_MyselfPlayer.GetMe().updateMaterialItems = new UserCardItem[6];
        //evolution
        Obj_MyselfPlayer.GetMe().evolutionHeroItem      = null;
        Obj_MyselfPlayer.GetMe().evolutionMaterialItems = new UserCardItem[5];
        //strengthen
        Obj_MyselfPlayer.GetMe().strengthenHeroItem = null;

        Obj_MyselfPlayer.ReleaseMe();
        //清空按钮闪烁状态
        MainController.needFlashLunJian = false;
        MainController.needFlashWulin   = false;
        //清空新手引导状态
        GuideManager.Instance.guideTimeOut();
        //NetworkSender.Instance().Login(LoginDone, AccountManager.Instance.GetLoginAccountID());
        //回到主菜单
        if (AccountManager.userType != AccountManager.UserType.OldUser)
        {
            PlayerPrefs.SetInt("InGameBackLogin", 1);            //标记玩家是否在游戏中返回登录
        }
        GameManager.Instance.LoadLevel(Utils.UI_NAME_Login);
#if UNITY_ANDROID
        //AndroidConfig.directShowLoginUI();
        //返回登陆之后注销账户
        AndroidConfig.SetThirdLoginInfo("");
#endif
    }