예제 #1
0
 public static GameObject PlayRandomClipAtPoint(AudioClip[] clips, Vector3 position, float volume)
 {
     if (clips.Length == 0)
     {
         return(null);
     }
     return(AudioSourceExt.PlayClipAtPointImmuneToTimeScaling(RandomExt.Pick <AudioClip>(clips), position, volume));
 }
예제 #2
0
 public static GameObject PlayRandomClip(AudioClip[] clips, float volume)
 {
     if (clips == null || Camera.main == null)
     {
         return(null);
     }
     return(AudioSourceExt.PlayClipAtPointImmuneToTimeScaling(RandomExt.Pick <AudioClip>(clips), Camera.main.transform.position, volume));
 }