Ejemplo n.º 1
0
 public static void GameLogOut()
 {
     SnapHttpConfig.LOGINED_APP_TOKEN = "";
     UserVoProxy.instance().ClearUserVoTemp();
     CorePlayData.isFirstTime = true;
     LoadSceneManager.Instance.LoadNormalScene("LoginScene");
 }
Ejemplo n.º 2
0
 protected void RequestUserVoCallback(SnapRpcDataVO _rpcResultObj)
 {
     if (_rpcResultObj.status == true)
     {
         UserVoProxy.instance().FinishItemRequest(this);
         JsonData    userData = _rpcResultObj.data["user"];
         UserVoBasic userVo   = UserVoProxy.instance().formatVo(userData);
         //把自己登陆的信息扔份数据给SelfPlayerData
         if (userData["id"].ToString() == GlobalConst.Player_IDTemp)
         {
             GameUserService.SaveGameUser(userData);
             LogManager.Log("登录用户的模型ID" + _rpcResultObj.data.TryGetString("modelID"));
             LogManager.Log("登录用户的表情ID" + _rpcResultObj.data.TryGetString("emotionID"));
             LogManager.Log("登录用户的省份" + userData.TryGetString("province"));
             LogManager.Log("登录用户的城市" + userData.TryGetString("city"));
             SelfPlayerData.Country = int.Parse(userData.TryGetString("country"));
             if (DebugConfigController.Instance._debugLanguage == false)
             {
                 LanguageManager.languageType = SelfPlayerData.Country == 0 ? LanguageType.Chinese : LanguageType.English;
             }
             else
             {
                 if (DebugConfigController.Instance._isChinese)
                 {
                     LanguageManager.languageType = LanguageType.Chinese;
                 }
                 else
                 {
                     LanguageManager.languageType = LanguageType.English;
                 }
             }
             XunFeiSRManager.OnRuntimeMethodLoad(LanguageManager.languageType);
             SelfPlayerData.Province  = userData.TryGetString("province");
             SelfPlayerData.City      = userData.TryGetString("city");
             SelfPlayerData.ModelId   = _rpcResultObj.data.TryGetString("modelID");
             SelfPlayerData.EmotionId = _rpcResultObj.data.TryGetString("emotionID");
             BookSceneManager.GetCourseFormServer();
             if (SelfPlayerData.ModelId.Equals("0") || SelfPlayerData.EmotionId.Equals("0"))
             {
                 //用户还没创建角色则更新角色信息到服务器
                 RoleManager.Instance.SbmitRoleInfoToServer();
             }
             else
             {
                 //已经创建过角色了则已经是第二次登录了直接进选关界面
                 LogManager.Log(SceneManager.GetActiveScene().name);
                 if (SceneManager.GetActiveScene().name.Equals("LoginScene"))
                 {
                     LoadSceneManager.Instance.LoadNormalScene("BookScene");
                 }
             }
         }
         if (mCallback != null)
         {
             mCallback(userVo);
             mCallback = null;
         }
     }
 }
Ejemplo n.º 3
0
    //#region
    //public Image playInfoTitleImage;
    //public Text playInfoSelfName;
    //public Text playInfoSelfChenghao;
    //public Text playInfoDesc;
    //public Text playInfoSelfSui;
    //public Text playInfoOtherName;
    //public Text playInfoOtherChenghao;
    //public Text playInfoOtherSex;
    //public Text playInfoOtherAge;
    //public Text playInfoTouxiang;
    //#endregion
    //private void InitGameObjectUI()
    //{
    //    playInfoSelfName.text = LanguageManager.Instance.GetValueByKey(playInfoSelfName.GetComponent<LanguageFlagClass>().selfType.ToString(), LanguageManager.languageType);
    //    playInfoSelfChenghao.text = LanguageManager.Instance.GetValueByKey(playInfoSelfChenghao.GetComponent<LanguageFlagClass>().selfType.ToString(), LanguageManager.languageType);
    //    playInfoDesc.text = LanguageManager.Instance.GetValueByKey(playInfoDesc.GetComponent<LanguageFlagClass>().selfType.ToString(), LanguageManager.languageType);
    //    playInfoSelfSui.text = LanguageManager.Instance.GetValueByKey(playInfoSelfSui.GetComponent<LanguageFlagClass>().selfType.ToString(), LanguageManager.languageType);
    //    playInfoOtherName.text = LanguageManager.Instance.GetValueByKey(playInfoOtherName.GetComponent<LanguageFlagClass>().selfType.ToString(), LanguageManager.languageType);
    //    playInfoOtherChenghao.text = LanguageManager.Instance.GetValueByKey(playInfoOtherChenghao.GetComponent<LanguageFlagClass>().selfType.ToString(), LanguageManager.languageType);
    //    playInfoOtherSex.text = LanguageManager.Instance.GetValueByKey(playInfoOtherSex.GetComponent<LanguageFlagClass>().selfType.ToString(), LanguageManager.languageType);
    //    playInfoOtherAge.text = LanguageManager.Instance.GetValueByKey(playInfoOtherAge.GetComponent<LanguageFlagClass>().selfType.ToString(), LanguageManager.languageType);
    //    playInfoTouxiang.text = LanguageManager.Instance.GetValueByKey(playInfoTouxiang.GetComponent<LanguageFlagClass>().selfType.ToString(), LanguageManager.languageType);
    //}

    public override void Open()
    {
        base.Open();

        mCloseBnt.onClick.AddListener(onClose);
        mDisplay.gameObject.SetActive(false);
        if (mUserVo == null)
        {
            bool isFromTemp = true;
            if (mUserID == SelfPlayerData.Uuid)
            {
                isFromTemp = false;
            }

            UserVoProxy.instance().RequestUserVo(mUserID, LoadUserVoCallback, isFromTemp);
        }
        else
        {
            GoGoGo();
        }
        //InitGameObjectUI();
        LogManager.Log("个人信息", mUserID);
        PlayerInfoPanel.SetAvatar(mHeadImg, mUserID);
    }
Ejemplo n.º 4
0
 public static UserVoProxy instance()
 {
     _instance = _instance == null ? (new UserVoProxy()) : _instance;
     return(_instance);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 登陆成功,获取玩家的具体信息
 /// </summary>
 public void GetLoginUserInfo()
 {
     UserVoProxy.instance().RequestUserVo(GlobalConst.Player_IDTemp);
 }