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