コード例 #1
0
 /// <summary>
 /// 点击删除好友
 /// </summary>
 public void OnClickDeleteFriend()
 {
     if (focusDeleteItem != null)
     {
         var scFriendInfo = focusDeleteItem.GetComponent <UIPoolItemFriendInfo>().scFriendInfo;
         // 请求删除好友
         CSDelFriend csDelFriend = new CSDelFriend()
         {
             OperationUid = scFriendInfo.Uid
         };
         ProtocalManager.Instance().SendCSDelFriend(csDelFriend, (serverRes) =>
         {
             StaticData.playerInfoData.listFriendInfo.RemoveAt(focusDeleteItem.GetComponent <UIPoolItemFriendInfo>().itemIndex);
             //Destroy(focusDeleteItem);
             GenerateFriendListUI();
             _tipDeleteFriendTF.gameObject.SetActive(false);
             focusDeleteItem = null;
             string tips     = LocalizationDefineHelper.GetStringNameById(120143);
             StaticData.CreateToastTips(tips);
             GenerateFriendAmountUI(true);
         }, (error) => { });
     }
 }
コード例 #2
0
        public void SendCSDelFriend(CSDelFriend csdelfriend, Action <SCEmtpyDelFriend> ResponseSCEmtpyDelFriendCallBack, Action <ErrorInfo> errorCallBack, bool isShowDefaultTip = true)
        {
            OpCodeType opCodeType = ListOPRelation.GetOpCodeTypeByRequest <CSDelFriend> ();

            ProtoSendMethod.BusinessRequest <SCEmtpyDelFriend>(csdelfriend, opCodeType, ResponseSCEmtpyDelFriendCallBack, errorCallBack, isShowDefaultTip);
        }