public override void StopResourceConverter() { base.StopResourceConverter(); this.part.Effect(runningEffect, 0.0f); this.part.Effect(stopEffect, 1.0f); updateTextureModules(); if (waterfallFXModule != null) { waterfallFXModule.SetControllerValue(waterfallEffectController, 0); } }
public override void OnUpdate() { base.OnUpdate(); if (!HighLogic.LoadedSceneIsFlight) { return; } // Update Waterfall if (waterfallFXModule != null) { waterfallFXModule.SetControllerValue(waterfallEffectController, animationThrottle); } }
public override void OnUpdate() { base.OnUpdate(); if (!HighLogic.LoadedSceneIsFlight) { return; } // Play running effect if needed. this.part.Effect(runningEffect, animationThrottle); // Update animated textures updateTextureModules(); // Update Waterfall if (waterfallFXModule != null) { waterfallFXModule.SetControllerValue(waterfallEffectController, animationThrottle); } }
public override void FXUpdate() { base.FXUpdate(); if (!HighLogic.LoadedSceneIsFlight) { return; } if (EngineIgnited && isEnabled && !flameout && !warpFlameout) { this.part.Effect(runningEffectName, 1f); } // Update our animated texture module, if any. float throttle = FlightInputHandler.state.mainThrottle; int count = warpEngineTextures.Count; for (int index = 0; index < count; index++) { warpEngineTextures[index].isActivated = EngineIgnited; warpEngineTextures[index].animationThrottle = throttle > 0f ? throttle : 0.1f; } // If we aren't supposed to apply warp translation then there's nothing more to do. if (!applyWarpTranslation) { return; } // Update active warp coils count = warpCoils.Count; for (int index = 0; index < count; index++) { warpCoils[index].animationThrottle = !warpFlameout ? throttle : 0f; } // Update warp effects if (bowShockTransform != null) { bowShockTransform.position = this.part.vessel.transform.position; } if (waterfallFXModule != null) { float targetValue = 0f; if (throttleLevel > 0) { targetValue = waterfallWarpEffectsCurve.Evaluate(warpSpeed); } effectsThrottle = Mathf.Lerp(effectsThrottle, targetValue, engineSpoolTime); if (effectsThrottle <= 0.001 && targetValue <= 0f) { effectsThrottle = 0; } else if (targetValue > 0f && targetValue >= effectsThrottle && (effectsThrottle / targetValue >= 0.99f)) { effectsThrottle = targetValue; } else if (targetValue > 0f && effectsThrottle > targetValue && targetValue / effectsThrottle >= 0.99f) { effectsThrottle = targetValue; } waterfallFXModule.SetControllerValue(waterfallEffectController, effectsThrottle); } if (!hasExceededLightSpeed && warpSpeed >= 1f) { hasExceededLightSpeed = true; this.part.Effect(photonicBoomEffectName, 1); } }