Example #1
0
    void  OnMouseDown()
    {
        GetComponent <AudioSource>().Play();

        if (btnName == "btnSiguiente")
        {
            this.cargar = "recompensa";
            GetComponent <AudioSource>().Play();

            Invoke("cargarEscena", GetComponent <AudioSource>().clip.length);
        }
        else if (btnName == "btnSalir")
        {
            check.Reintentar();
            this.cargar = "eligeTema";
            GetComponent <AudioSource>().Play();
            Invoke("cargarEscena", GetComponent <AudioSource>().clip.length);
            Debug.Log("Intentando borrar el pizarrón");
        }
        else if (btnName == "btnReintentar")
        {
            check.Reintentar();
        }
        else if (btnName == "btnSalirR")
        {
            this.cargar = "reconocimiento";
            GetComponent <AudioSource>().Play();
            Invoke("cargarEscena", GetComponent <AudioSource>().clip.length);
        }
    }
Example #2
0
    void  OnMouseDown()
    {
        Debug.Log(btnName);
        GetComponent <AudioSource>().Play();

        if (btnName == "btnSiguiente")
        {
            this.cargar = "recompensa";
            GetComponent <AudioSource>().Play();

            Invoke("cargarEscena", GetComponent <AudioSource>().clip.length);
        }
        else if (btnName == "btnSalir")
        {
            check.Reintentar();
            this.cargar = "eligeTema";
            GetComponent <AudioSource>().Play();
            Invoke("cargarEscena", GetComponent <AudioSource>().clip.length);
        }
        else if (btnName == "btnReintentar")
        {
            check.Reintentar();
        }
        else if (btnName == "btnSalirR")
        {
            Debug.Log("Entro");

            this.cargar = "reconocimiento";
            GetComponent <AudioSource>().Play();
            Invoke("cargarEscena", GetComponent <AudioSource>().clip.length);
        }
        else if (btnName == "btnAudio")
        {
            GameObject.Find("btnAudio").GetComponent <AudioSource>().Play();
        }
    }