public void ToggleCoolingMode() { if (coolingCycleMode == CoolingCycleModes.closed) { coolingCycleMode = CoolingCycleModes.open; Events["ToggleCoolingMode"].guiName = "Cooling Mode (open)"; showParticleEffects(true); if (soundClip != null) { soundClip.audio.volume = soundEffectVolume; soundClip.audio.Play(); } } else { coolingCycleMode = CoolingCycleModes.closed; Events["ToggleCoolingMode"].guiName = "Cooling Mode (closed)"; showParticleEffects(false); if (soundClip != null) { soundClip.audio.Stop(); } } }
public void ToggleCoolingMode() { if (coolingCycleMode == CoolingCycleModes.closed) { coolingCycleMode = CoolingCycleModes.open; Events["ToggleCoolingMode"].guiName = "Cooling Mode (open)"; } else { coolingCycleMode = CoolingCycleModes.closed; Events["ToggleCoolingMode"].guiName = "Cooling Mode (closed)"; } }
public override void OnStart(StartState state) { base.OnStart(state); //ModuleActiveRadiator activeRadiator = this.part.FindModuleImplementing <ModuleActiveRadiator>(); //Get the resource definition for electric charge. electricChargeDef = definitions["ElectricCharge"]; //Set cooling mode. For now, default is closed. coolingCycleMode = CoolingCycleModes.closed; Events["ToggleCoolingMode"].guiName = "Cooling Mode (closed)"; //Dig into the proto part and find the coolant resource nodes. getCoolantNodes(); //Load the sound effects LoadSoundFX(); }
public override void OnStart(StartState state) { base.OnStart(state); //Get the resource definition for electric charge. electricChargeDef = definitions["ElectricCharge"]; //Since we are based upon the ModuleDeployableSolarPanel, hide its gui Fields["sunAOA"].guiActive = false; Fields["flowRate"].guiActive = false; //Set cooling mode. For now, default is closed. coolingCycleMode = CoolingCycleModes.closed; Events["ToggleCoolingMode"].guiName = "Cooling Mode (closed)"; //Dig into the proto part and find the coolant resource nodes. getCoolantNodes(); this.part.OnJustAboutToBeDestroyed = OnAboutToBeDestroyed; }
public override void OnStart(StartState state) { base.OnStart(state); //ModuleDeployableRadiator //Get the resource definition for electric charge. electricChargeDef = definitions["ElectricCharge"]; //Set cooling mode. For now, default is closed. coolingCycleMode = CoolingCycleModes.closed; Events["ToggleCoolingMode"].guiName = "Cooling Mode (closed)"; //Dig into the proto part and find the coolant resource nodes. getCoolantNodes(); //Load the sound effects LoadSoundFX(); //Create fixed update helper fixedUpdateHelper = this.part.gameObject.AddComponent <FixedUpdateHelper>(); fixedUpdateHelper.onFixedUpdateDelegate = UpdateState; fixedUpdateHelper.enabled = true; }
public void ClosedModeAction(KSPActionParam param) { coolingCycleMode = CoolingCycleModes.closed; Events["ToggleCoolingMode"].guiName = "Cooling Mode (closed)"; }
public void OpenModeAction(KSPActionParam param) { coolingCycleMode = CoolingCycleModes.open; Events["ToggleCoolingMode"].guiName = "Cooling Mode (open)"; }