예제 #1
0
    public void CreateList()
    {
        foreach (FacebookFriends.Friend data in SocialManager.Instance.facebookFriends.all)
        {
            ChallengerCreatorButton newButton = Instantiate(button) as ChallengerCreatorButton;
            newButton.transform.SetParent(container.transform);

            string facebookID = data.id;
            bool   done       = false;

            //si es un recien elegido...
            if (facebookID == lastSelectedFacebookId)
            {
                done = true;
            }
            else
            {
                foreach (ChallengersManager.PlayerData challengesMadeFBId in SocialManager.Instance.challengesManager.made)
                {
                    if (challengesMadeFBId.facebookID == facebookID)
                    {
                        done = true;
                    }
                }
            }
            newButton.Init(this, data.username, facebookID, done);
        }
    }
예제 #2
0
    public void CreateList()
    {
        for (int a = 0; a < Data.Instance.userData.FacebookFriends.Count; a++)
        {
            UserData.FacebookUserData data = Data.Instance.userData.FacebookFriends[a];

            ChallengerCreatorButton newButton = Instantiate(button) as ChallengerCreatorButton;
            newButton.transform.SetParent(container.transform);

            string facebookID = data.facebookID;
            bool   done       = false;

            //si es un recien elegido...
            if (facebookID == lastSelectedFacebookId)
            {
                done = true;
            }
            else
            {
                foreach (string challengesMadeFBId in challengesMade)
                {
                    if (challengesMadeFBId == facebookID)
                    {
                        done = true;
                    }
                }
            }


            newButton.Init(this, a + 1, data.username, facebookID, done);
            newButton.transform.localScale = new Vector3(0.74f, 0.74f, 0.74f);
        }
    }