Ejemplo n.º 1
0
    void OnMouseDown()
    {
        for (int i = 0; i < targets.Count; i++)
        {
            Fade obj = targets[i];
            obj.AltFade();
        }

        bool lit = animator.GetBool("lit");

        if (lit)
        {
            audio.clip = backward;
        }
        else
        {
            audio.clip = forward;
        }

        audio.Play();
        animator.SetBool("lit", !lit);
    }