Esempio n. 1
0
 public void SetFadeOut(bool remove = false)
 {
     timeLeft           = EngineDelegateCore.VolumeDuration;
     isFadeIn           = false;
     audioSource.volume = GOEAudioMgr.GetVolumeByType(type);
     removeAtEnd        = remove;
 }
Esempio n. 2
0
 public void SetVolume()
 {
     if (isFadeIn)
     {
         audioSource.volume = ((EngineDelegateCore.VolumeDuration - timeLeft) * GOEAudioMgr.GetVolumeByType(type) / EngineDelegateCore.VolumeDuration);
     }
     else
     {
         audioSource.volume = timeLeft * GOEAudioMgr.GetVolumeByType(type) / EngineDelegateCore.VolumeDuration;
     }
 }