Exemple #1
0
        protected void FreshUserInfoView(YxBaseUserInfo userInfo)
        {
            PlayerInfo.Info = userInfo;
            var gdata = App.GameData;

            if (gdata == null || userInfo.Seat == gdata.SelfSeat)
            {
                return;
            }
            var parm = new Dictionary <string, object>();

            parm["userId"]  = userInfo.UserId;
            parm["gameKey"] = App.GameKey;
            Facade.Instance <TwManager>().SendAction("gamePartnerInfo", parm, obj =>
            {
                if (PlayerInfo == null)
                {
                    return;
                }
                var dict = obj as Dictionary <string, object>;
                if (dict == null)
                {
                    return;
                }
                userInfo = GetData <YxBaseUserInfo>();
                if (userInfo == null)
                {
                    return;
                }
                userInfo.Parse(dict);
                PlayerInfo.Info = userInfo;
            }, false, null, false);
        }
Exemple #2
0
        /// <summary>
        ///  显示等待上庄的玩家信息
        /// </summary>
        public void ShowUserInfoUI()
        {
            var gdata = App.GetGameData <Bjl3DGameData>();

            if (_record == -1)
            {
                _record = gdata.B;
            }

            if (_record != gdata.B)
            {
                _isChangezhuang = true;
            }
            else
            {
                _isChangezhuang = false;
            }
            if (gdata.BankList == null || gdata.BankList.Size() == 0)
            {
                gdata.CurrentBanker.Seat     = gdata.B;
                _rankerNameText.text         = "系统庄";
                _rankerAchievementText.text  = /*_resultGold +*/ "";
                _rankerGameCurrencyText.text = "∞";
                return;
            }
            var waitForRankerListUI = App.GetGameManager <Bjl3DGameManager>().TheWaitForRankerListUI;

            foreach (ISFSObject banker in gdata.BankList)
            {
                var user = new YxBaseUserInfo();
                user.Parse(banker);
                if (banker.ContainsKey("username"))
                {
                    user.NickM = banker.GetUtfString("username");
                }

                gdata.CurrentBanker.Seat = gdata.B;
                if (user.Seat == gdata.B)
                {
                    App.GameData.GStatus         = YxEGameStatus.PlayAndConfine;
                    gdata.CurrentBanker          = user;
                    _rankerNameText.text         = user.NickM;
                    _rankerAchievementText.text  = YxUtiles.GetShowNumberToString(gdata.ResultBnakerTotal);
                    _rankerGameCurrencyText.text = YxUtiles.GetShowNumberToString(user.CoinA);
                }
                else
                {
                    waitForRankerListUI.ShowRankerListUI(user.NickM, user.CoinA);
                }
            }
        }
 public void SetData(List <object> list)
 {
     if (null != list && list.Count != 0)
     {
         for (int i = 0; i < list.Count; i++)
         {
             YxBaseUserInfo info = new YxBaseUserInfo();
             info.Parse((Dictionary <string, object>)list[i]);
             mDataList.Add(info);
         }
         Scroller.ReloadData();
     }
     Title.gameObject.SetActive(mDataList.Count == 0);
 }