/// <summary> /// 点击添加好友通知的拒绝 /// </summary> /// <param name="param"></param> private void ClickNoNewFriend(object param) { button.clip = common; button.Play(); var noticePlayerAddFriend_ack = new mmopb.noticePlayerAddFriend_ack(); noticePlayerAddFriend_ack.isAgree = false; noticePlayerAddFriend_ack.roleId = roleId; ClientNet.Instance.Send(ProtoHelper.EncodeWithName(noticePlayerAddFriend_ack)); lobbyView.newFriend.SetActive(false); }
/// <summary> /// 点击添加好友通知的同意添加 /// </summary> /// <param name="param"></param> private void ClickYesNewFriend(object param) { button.clip = common; button.Play(); var noticePlayerAddFriend_ack = new mmopb.noticePlayerAddFriend_ack(); noticePlayerAddFriend_ack.isAgree = true; noticePlayerAddFriend_ack.roleId = roleId; ClientNet.Instance.Send(ProtoHelper.EncodeWithName(noticePlayerAddFriend_ack)); lobbyView.newFriend.SetActive(false); if (friendView.friends.activeInHierarchy == true) { var friendReq = new mmopb.friendsList_req(); ClientNet.Instance.Send(ProtoHelper.EncodeWithName(friendReq)); } }