Ejemplo n.º 1
0
 //Fade In a Normal Music
 void FadeInNonPersistentMusic()
 {
     // Checks if an Multi Audio Source is playing at Channel 3 to fade in correctly the new audio without immediately stop the previous one
     if (MultiAudioManager.GetAudioSourceAtChannel(3) != null)
     {
         MultiAudioManager.FadeOutAudioSource(3, 1f);                                                    //Fade out previous audio
         MultiAudioManager.FadeInDelayedAudioObject(musicAudioObject, 1.25f, 3, transform.position, 2f); //Fade in new audio 0.25 seconds after the fade out of the previous audio
     }
     else
     {
         MultiAudioManager.FadeInAudioObject(musicAudioObject, 3, transform.position, 2f);                  //Fade in new audio
     }
 }