Esempio n. 1
0
        private void CreateUI(G2C_FriendRoomInfo m2cFriend)
        {
            ScoreTxt.text = m2cFriend.Score.ToString();
            PlayerInfoComponent.Instance.GetPlayerInfo().Score = m2cFriend.Score;

            //今天沒有贈送好友房钥匙
            if (!PlayerInfoComponent.Instance.GetPlayerInfo().IsGiveFriendKey)
            {
                //显示赠送界面
                ToastScript.createToast("每日赠送3把钥匙,仅限当日使用");
                PlayerInfoComponent.Instance.GetPlayerInfo().IsGiveFriendKey = m2cFriend.IsGiveFriendKey;
            }

            PlayerInfoComponent.Instance.GetPlayerInfo().FriendKeyCount = m2cFriend.KeyCount;
            #endregion

            if (m2cFriend.Info.Count <= 0)
            {
                NoRoomTipTxt.SetActive(true);
            }
            else
            {
                NoRoomTipTxt.SetActive(false);
            }
            CreateRoomItemss(m2cFriend.Info);
        }
Esempio n. 2
0
        private async void GetRoomInfoReq()
        {
            #region 向服务器请求信息
            UINetLoadingComponent.showNetLoading();

            G2C_FriendRoomInfo m2cFriend = (G2C_FriendRoomInfo)await SessionComponent.Instance.Session.Call(new C2G_FriendRoomInfo { UId = PlayerInfoComponent.Instance.uid });

            UINetLoadingComponent.closeNetLoading();
            PlayerInfoComponent.Instance.GetPlayerInfo().FriendKeyCount = m2cFriend.KeyCount;

            CreateUI(m2cFriend);
        }
Esempio n. 3
0
        private async void GetRoomReqX()
        {
            G2C_FriendRoomInfo m2cFriend = (G2C_FriendRoomInfo)await SessionComponent.Instance.Session.Call(new C2G_FriendRoomInfo { UId = PlayerInfoComponent.Instance.uid });

            CreateUI(m2cFriend);
        }