Esempio n. 1
0
        public override void SetOn(Sample sample, float value)
        {
            AudioReverbFilter audioReverbFilter = ((Component)sample.source).GetComponent <AudioReverbFilter>();

            if ((UnityEngine.Object)audioReverbFilter == (UnityEngine.Object)null)
            {
                audioReverbFilter = sample.source.gameObject.AddComponent <AudioReverbFilter>();
            }
            ReverbSetup reverbSetup;

            if (value < 0.0010000000474974513)
            {
                reverbSetup = this.baseSetup;
            }
            reverbSetup = ((!(value > 0.99900001287460327)) ? ReverbSetup.Lerp(this.baseSetup, this.targetSetup, value) : this.targetSetup);
            reverbSetup.ApplyTo(audioReverbFilter);
        }
        public override void SetOn(Sample sample, float value)
        {
            AudioReverbFilter audioReverbFilter = sample.source.GetComponent <AudioReverbFilter>();

            if (audioReverbFilter == null)
            {
                audioReverbFilter = sample.source.gameObject.AddComponent <AudioReverbFilter>();
            }
            ReverbSetup reverbSetup;

            if (value < 0.001f)
            {
                reverbSetup = baseSetup;
            }
            reverbSetup = ((!(value > 0.999f)) ? ReverbSetup.Lerp(baseSetup, targetSetup, value) : targetSetup);
            reverbSetup.ApplyTo(audioReverbFilter);
        }