Ejemplo n.º 1
0
    IEnumerator DoExitGame()
    {
        // AudioSource audioSource = exitButton.GetComponent<AudioSource>();
        // audioSource.mute = SoundControl.Instance.IsFXMuted;
        // audioSource.volume = SoundControl.Instance.FXVolume;
        // audioSource.Play();
        UIButtonFX fx = playButton.GetComponent <UIButtonFX>();

        fx.PlayFX(UIButtonFX.ButtonFXType.Click);
        yield return(new WaitWhile(() => fx.IsFXPlaying()));

        Application.Quit();
    }