Example #1
0
    private IEnumerator ActivateButton()
    {
        for (int i = 0; i < audio.Length; i++)
        {
            if (audio[i].isPlaying)
            {
                if (audio[i].tag == m_Tag)
                {
                    Debug.Log("Success");
                    player.StopAudio();
                    player.playAudio();
                    break;
                }
                else
                {
                    Debug.Log("Failed");
                    player.StopAudio();
                    player.playAudio();
                    break;
                }
            }
        }

        //SceneManager.LoadScene(name);
        //StartCoroutine(UIController.Instance.info(pName, pInfo, pImg));
        yield break;
        // If the camera is already fading, ignore.
        // if (m_CameraFade.IsFading)
        //    yield break;

        // If anything is subscribed to the OnButtonSelected event, call it.
        // if (OnButtonSelected != null)
        //     OnButtonSelected(this);

        // // Wait for the camera to fade out.
        // yield return StartCoroutine(m_CameraFade.BeginFadeOut(true));

        // // Load the level.
        // SceneManager.LoadScene(m_SceneToLoad, LoadSceneMode.Single);
    }