Beispiel #1
0
 public void Play(Audio.Clip type, float volume = 1, float stereoPan = 0)
 {
     source.clip      = GetClip(type);
     source.volume    = volume;
     source.panStereo = stereoPan;
     source.Play();
     GetComponent <AudioSource>().PlayOneShot(source.clip);
 }
Beispiel #2
0
 public AudioClip GetClip(Audio.Clip type)
 {
     return(sounds.Find(s => s.clip.Equals(type)).audio);
 }