public void FixedUpdate() { if (!HighLogic.LoadedSceneIsFlight) { return; } //Run compressor/decompressor if (liftCapacityState == LiftCapacityStates.Decreasing && currentVolume > 0) { currentVolume -= (compressorRate * envelopeVolume) * TimeWarp.fixedDeltaTime; if (currentVolume < 0) { currentVolume = 0; liftCapacityState = LiftCapacityStates.Empty; } } else if (liftCapacityState == LiftCapacityStates.Increasing && currentVolume < envelopeVolume) { currentVolume += (compressorRate * envelopeVolume) * TimeWarp.fixedDeltaTime; if (currentVolume >= envelopeVolume) { currentVolume = envelopeVolume; liftCapacityState = LiftCapacityStates.Maximum; } } //Apply lift applyPerPartLift(); }
protected void updateCompressorStates(LiftCapacityStates liftCapacityState) { int count = liftModules.Count; for (int index = 0; index < count; index++) { liftModules[index].liftCapacityState = liftCapacityState; } }
public void StopLiftCapacityChange() { liftCapacityState = LiftCapacityStates.Stopped; }
public void DecreaseLiftCapacity() { liftCapacityState = LiftCapacityStates.Decreasing; }
public void IncreaseLiftCapacity() { liftCapacityState = LiftCapacityStates.Increasing; }