Beispiel #1
0
 public AudioClip GetAudioPairs(AudibleNames.Fire name)
 {
     if (this.audioPairs == null)
     {
         this.GenerateAudioPairs();
     }
     if (this.audioPairs.ContainsKey(name))
     {
         return(this.audioPairs [name]);
     }
     else
     {
         return(null);
     }
 }
 public void Play(AudibleNames.Fire name, bool isLoop = false)
 {
     if (fireSFX == null)
     {
         if (GetComponentInChildren <FireSFX>() != null)
         {
             this.fireSFX = GetComponentInChildren <FireSFX>();
             if (this.fireSFX.GetAudioSource(name) != null)
             {
                 this.fireSFX.GetAudioSource(name).loop = isLoop;
                 this.PlaySource(fireSFX.GetAudioSource(name));
             }
         }
     }
     else
     {
         if (this.fireSFX.GetAudioSource(name) != null)
         {
             this.fireSFX.GetAudioSource(name).loop = isLoop;
             this.PlaySource(fireSFX.GetAudioSource(name));
         }
     }
 }
Beispiel #3
0
 public AudioSource GetAudioSource(AudibleNames.Fire name)
 {
     this.GetAudioSource().clip = this.GetAudioPairs(name);
     return(this.audioSource);
 }