Beispiel #1
0
 void PlayTractorBeamSound()
 {
     if (!TractorActiveSound.isPlaying)
     {
         StopCoroutine(FadeOutTractorActiveSound());
         TractorActiveSound.volume = SoundSettingCompare("FXSlider");
         TractorActiveSound.Play();
     }
 }
Beispiel #2
0
 IEnumerator FadeOutTractorActiveSound()
 {
     if (TractorActiveSound.isPlaying)
     {
         while (TractorActiveSound.volume > 0)
         {
             TractorActiveSound.volume -= 0.1f;
             yield return(new WaitForSeconds(0.1f));
         }
         TractorActiveSound.Stop();
     }
     yield return(null);
 }