// Use this for initialization
        public void UpdateGames(GameFeaturedResult data)
        {
            var games = data.games;

            foreach (Game featuredGames in data.games)
            {
                GameObject currentGame = Instantiate(featuredGamePreFab, new Vector3(0, 0, 0), Quaternion.identity) as GameObject;

                currentGame.transform.parent = gamesToggleGroup.transform;

                Text nameText = currentGame.GetComponentInChildren <Text> ();
                nameText.text = featuredGames.name;

                Transform background = currentGame.transform.Find("Background");

                Image gameImage = background.GetComponent <Image> ();
                nameText.text = featuredGames.name;

                TacoButton tacoButton = currentGame.GetComponentInChildren <TacoButton> ();

                if (featuredGames.links.Count > 0)
                {
                    // using Name to store the URL - versus adding a new member variable to all buttons
                    tacoButton.Name = featuredGames.links[0].value;
                }


                string url = featuredGames.imageUrl;


                print(url);

                StartCoroutine(ApiManager.Instance.WWWImageLoad(url, gameImage));
            }
        }
Exemple #2
0
        public void AddInvite(string email, int index)
        {
            GameObject invitedEntry = Instantiate(InviteInputField, Invited.transform) as GameObject;

            InputField invitedInputField = invitedEntry.GetComponent <InputField> ();

            invitedInputField.interactable           = false;
            invitedInputField.text                   = email;
            invitedInputField.textComponent.fontSize = 24;

            TacoButton tacoButton = invitedEntry.GetComponentInChildren <TacoButton> ();

            tacoButton.SetCallBackDataInt(index);
        }
        public void AddInvite(string email, int index)
        {
            GameObject invitedEntry = Instantiate(InviteInputField, Invited.transform) as GameObject;

            InputField invitedInputField = invitedEntry.GetComponent <InputField>();


            //invitedEntry.transform.position = new Vector3(10.0f, 10.0f, 0.0f);

            invitedInputField.enabled = false;
            invitedInputField.text    = email;
            invitedInputField.textComponent.fontSize = 24;

            TacoButton tacoButton = invitedEntry.GetComponentInChildren <TacoButton>();

            tacoButton.SetCallBackDataInt(index);
        }