예제 #1
0
 public void OnClickApprove()
 {
     C2G.FriendsApprove packet = new C2G.FriendsApprove();
     packet.account_idx = m_Info.account_idx;
     packet.is_all      = false;
     Network.GameServer.JsonAsync <C2G.FriendsApprove, C2G.FriendsAckBase>(packet, OnFriendsApproveHandler);
 }
예제 #2
0
파일: Friends.cs 프로젝트: tapenjoyGame/cry
 public void OnClickApproveAll()
 {
     if (m_Friends.Count == 0)
     {
         return;
     }
     C2G.FriendsApprove packet = new C2G.FriendsApprove();
     packet.account_idx = 0;
     packet.is_all      = true;
     Network.GameServer.JsonAsync <C2G.FriendsApprove, C2G.FriendsAckBase>(packet, OnFriendsApproveHandler);
 }
예제 #3
0
    void OnFriendsApproveHandler(C2G.FriendsApprove packet, C2G.FriendsAckBase ack)
    {
        switch (ack.result)
        {
        case pe_FriendsResult.Success:
            StateInfo.state = eFriendsState.Friends;
            gameObject.SetActive(false);
            if (OnCallback != null)
            {
                OnCallback(m_Info);
            }
            break;

        default:
            Friends.ShowFriendsErrorTooltip(ack.result);
            break;
        }
    }
예제 #4
0
파일: Friends.cs 프로젝트: tapenjoyGame/cry
    void OnFriendsApproveHandler(C2G.FriendsApprove packet, C2G.FriendsAckBase ack)
    {
        switch (ack.result)
        {
        case pe_FriendsResult.Success:
            m_Friends.ForEach(e => e.state_info.state = eFriendsState.Friends);
            m_FriendsList.AddRange(m_Friends);
            m_Friends.Clear();
            InitItem();
            Network.Instance.NotifyMenu.is_friends_requested = false;
            UpdateNotify();

            break;

        default:
            ShowFriendsErrorTooltip(ack.result);
            break;
        }
    }