Пример #1
0
        public static GameFriendsReply GameFriendsToGameFriendsReply(GSEnumerable <ListGameFriendsResponse._Player> socialFriends)
        {
            GameFriendsReply reply = new GameFriendsReply(true);

            foreach (ListGameFriendsResponse._Player friend in socialFriends)
            {
                reply.Friends.Add(new GameFriendsReply.Friend(friend.ExternalIds.GetString("FB"), friend.DisplayName));
            }

            return(reply);
        }
Пример #2
0
    void GameFriendsCallback(GameFriendsReply reply)
    {
        if (reply.Success)
        {
            Debug.Log("Game Friends");
            foreach (GameFriendsReply.Friend friend in reply.Friends)
            {
                Debug.Log(friend.Id + ": " + friend.Name);
            }

            TestUserProfile();
        }
        else
        {
            Debug.Log("Fetching game friends failed");
        }
    }