コード例 #1
0
    //当按下确定按钮
    public void OnOkClick()
    {
        MsgAcceptAddFriend msgAcceptAddFriend = new MsgAcceptAddFriend();

        msgAcceptAddFriend.Id       = id;
        msgAcceptAddFriend.FriendId = friendId;
        NetManager.Send(msgAcceptAddFriend);
    }
コード例 #2
0
ファイル: GameMain.cs プロジェクト: mogebingxue/RemainHistory
    //接受好友申请回调
    private void OnMsgAcceptAddFriend(Request request)
    {
        MsgAcceptAddFriend msgAcceptAddFriend = MsgAcceptAddFriend.Parser.ParseFrom(request.Msg);

        if (msgAcceptAddFriend.FriendId == GameMain.id)
        {
            PanelManager.Open <TipPanel>("添加" + msgAcceptAddFriend.Id + "成功!");
        }
        if (PanelManager.panels.ContainsKey("FriendPanel"))
        {
            FriendPanel friendPanel = (FriendPanel)PanelManager.panels["FriendPanel"];
            friendPanel.UpdataFriendList();
        }
    }
コード例 #3
0
    //接受好友申请回调
    private void OnMsgAcceptAddFriend(Request request)
    {
        MsgAcceptAddFriend msgAcceptAddFriend = MsgAcceptAddFriend.Parser.ParseFrom(request.Msg);

        if (msgAcceptAddFriend.Id == GameMain.id)
        {
            if (msgAcceptAddFriend.Result == 0)
            {
                PanelManager.Open <TipPanel>("添加成功!");
            }
            else
            {
                PanelManager.Open <TipPanel>("添加失败!");
            }
        }
    }
コード例 #4
0
    //接受好友申请回调
    private void OnMsgAcceptAddFriend(Request request)
    {
        MsgAcceptAddFriend msgAcceptAddFriend = MsgAcceptAddFriend.Parser.ParseFrom(request.Msg);

        UpdataFriendList();
    }