Ejemplo n.º 1
0
    public void SetBlinkWrong(Button altButton)
    {
        BlinkingButton blink = altButton.gameObject.AddComponent <BlinkingButton>();

        blink.fromColor = _altButtonColor;
        blink.toColor   = Color.red;
        blink.blinkTime = 0.2f;
    }
Ejemplo n.º 2
0
    public void SetBlinkRight(Button altButton)
    {
        BlinkingButton blink = altButton.gameObject.AddComponent <BlinkingButton>();

        blink.fromColor = Color.white;
        blink.toColor   = Color.green;
        blink.blinkTime = 0.2f;
    }
Ejemplo n.º 3
0
    private IEnumerator GoToNextQuestion()
    {
        yield return(new WaitForSeconds(2.0f));

        EventSystem.current.SetSelectedGameObject(null);

        for (int i = 0; i < alternativeButtons.Length; ++i)
        {
            alternativeButtons[i].interactable = true;

            BlinkingButton blink = alternativeButtons[i].GetComponent <BlinkingButton>();
            if (blink != null)
            {
                Destroy(blink);
            }

            ColorBlock cb = alternativeButtons[i].colors;
            cb.disabledColor             = _altButtonColor;
            alternativeButtons[i].colors = cb;
        }

        this.questionCounter++;
        RefreshQuestion();
    }