Esempio n. 1
0
    void AddButton(string text, int id)
    {
        TriviaButton b = Instantiate(button);

        b.transform.SetParent(container);
        b.transform.localScale = Vector3.one;
        b.Init(this, id, text);
        b.gameObject.SetActive(false);
        buttons.Add(b);
    }
Esempio n. 2
0
    public void OnButtonSelected(TriviaButton button)
    {
        if (flechas != null)
        {
            flechas.GetComponent <Animator> ().Play("flechasOff");
        }

        if (button)
        {
            button.Ready();
        }

        trivia.PairDone();
        button1.DisableButton();
        button2.DisableButton();
        if (button3 != null)
        {
            button3.DisableButton();
        }
        if (button4 != null)
        {
            button4.DisableButton();
        }
    }