Ejemplo n.º 1
0
    /////////////////////////////////////////////////////////////////

    public void StopTrackMusic_Single(GameObject audioTrack)
    {
        //Get Tab
        RARC_AudioTab audioTab = audioTrack.gameObject.GetComponent <RARC_AudioTab>();

        //Fade Out Or Destory
        if (audioTab.currentAudio_SO.canFadeOut)
        {
            StartCoroutine(audioTab.IAudioVolumeDampeningOnDestory(audioTab.currentAudio_SO.fadeOutSpeed));
        }
        else
        {
            audioTab.DestoryAudio_Instant();
        }
    }
Ejemplo n.º 2
0
    public void StopTrackMusic_All()
    {
        //Loop all Tabs
        foreach (Transform child in audioTrack_Container.transform)
        {
            //Get Tab
            RARC_AudioTab audioTab = child.gameObject.GetComponent <RARC_AudioTab>();

            //Fade Out Or Destory
            if (audioTab.currentAudio_SO.canFadeOut)
            {
                StartCoroutine(audioTab.IAudioVolumeDampeningOnDestory(audioTab.currentAudio_SO.fadeOutSpeed));
            }
            else
            {
                audioTab.DestoryAudio_Instant();
            }
        }
    }