예제 #1
0
 public static GameObject PlayClip(AudioClip clip)
 {
     if (clip == null || Camera.main == null)
     {
         return(null);
     }
     return(AudioSourceExt.PlayClipAtPointImmuneToTimeScaling(clip, Camera.main.transform.position));
 }
예제 #2
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));
 }
예제 #3
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));
 }
예제 #4
0
 public static GameObject PlayClipAtPointImmuneToTimeScaling(AudioClip clip, Vector3 pos)
 {
     return(AudioSourceExt.PlayClipAtPointImmuneToTimeScaling(clip, pos, 1.0f));
 }