Ejemplo n.º 1
0
        public void PlayClip(SfxGroup group)
        {
            AudioSource source = Pool.Grab();

            source.clip   = group.GetClip();
            source.volume = UnityEngine.Random.Range(group.VolumeRange.x, group.VolumeRange.y);
            source.pitch  = UnityEngine.Random.Range(group.PitchRange.x, group.PitchRange.y);
            source.Play();
            StartCoroutine(ReturnToPool(source));
        }
Ejemplo n.º 2
0
 public static void Play(SfxGroup group)
 {
     instance.PlayClip(group);
 }