Beispiel #1
0
    /// <summary>
    /// 查找好友
    /// </summary>
    private void FindBut()
    {
        if (searchFriend != null)
        {
            Destroy(searchFriend.gameObject);
        }

        if (!UI_LobbyManager.myselfInfo.user_id.Equals(int.Parse(findInput.text)))
        {
            if (UI_LobbyManager.lobbyManager.friendInfos.ContainsKey(int.Parse(findInput.text)))
            {
                Debug.Log("已经是好友了");
            }
            else
            {
                //发送查找好友请求
                SendInfo.SendAddRequest(int.Parse(findInput.text), RequestType.friend_search, "");
                findInput.text = "";
            }
        }
        else
        {
            Debug.Log("不可以添加自己为好友");
        }
    }
Beispiel #2
0
    void AddButton()
    {
        //发送好友添加请求
        SendInfo.SendAddRequest(info.friend_id, RequestType.friend_add, remarksInput.text);

        Destroy(gameObject, 0.5f);
    }