/// <summary> /// Plays <see cref="clip"/> /// </summary> public override void Play(IUTKAudioSource audioSource, bool loop = false) { audioSource.clipVolume = this.volume.GetRandomInRange(); audioSource.clipPitch = this.pitch.GetRandomInRange(); audioSource.minDistance = this.minDistance; audioSource.maxDistance = this.maxDistance; audioSource.rolloffMode = this.rolloffMode; audioSource.Play(this.clip, loop); }
/// <summary> /// Plays <see cref="clip"/> /// </summary> public override void Play(IUTKAudioSource source, bool loop = false) { source.Play(this.clip, loop); }