Ejemplo n.º 1
0
 /// <summary>
 /// Override Play function for player avatar SFX.
 /// </summary>
 /// <param name="name">SFX name</param>
 /// <param name="isLoop">If the sound will loop.</param>
 public void Play(AudibleNames.Yuni name, bool isLoop)
 {
     if (yuniSFX == null)
     {
         if (GetComponentInChildren <YuniSFX> () != null)
         {
             this.yuniSFX = GetComponentInChildren <YuniSFX> ();
             this.yuniSFX.GetAudioSource(name).loop = isLoop;
             this.PlayOneShot(yuniSFX.GetAudioSource(name));
         }
     }
     else
     {
         this.yuniSFX.GetAudioSource(name).loop = isLoop;
         this.PlayOneShot(yuniSFX.GetAudioSource(name));
     }
 }
Ejemplo n.º 2
0
 public AudioSource GetAudioSource(AudibleNames.Yuni name)
 {
     this.audioSource.clip = this.audioPairs [name];
     return(this.audioSource);
 }