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