コード例 #1
0
        protected void SetIntensityFromExhaust(float throttle, int i)
        {
            //this is how we keep the maths to a minimum
            jitteredThrottle = throttle + jitterBuffer.GetAverage() * jitterMultiplier;                                  // per-frame jitter was annoying, now it's smoothed

            float intensity = lightIntensity * (jitteredThrottle * jitteredThrottle) * this.multiTransformIntensityMult; // exponential increase in intensity with throttle

            this.lightStacks[i].Item1.intensity = intensity * NOZZLE_LIGHT_INTENSITY_MULTIPLIER;
            this.lightStacks[i].Item2.intensity = intensity * AREA_LIGHT_INTENSITY_MULTIPLIER;

            float jitteredRange = lightRange * jitteredThrottle;                             // linear increase in range with throttle

            this.lightStacks[i].Item1.range = jitteredRange * NOZZLE_LIGHT_RANGE_MULTIPLIER; // linear increase in range with throttle
            this.lightStacks[i].Item2.range = jitteredRange * AREA_LIGHT_RANGE_MULTIPLIER;   // linear increase in range with throttle
        }