new static public SimulatedParachute New(ModuleParachute mp, ReentrySimulation.SimCurves simCurve, double startTime, int limitChutesStage) { SimulatedParachute part = new SimulatedParachute(); part.Set(mp.part, simCurve); part.Set(mp, startTime, limitChutesStage); return part; }
new static public SimulatedParachute New(ModuleParachute mp, ReentrySimulation.SimCurves simCurve, double startTime, int limitChutesStage) { SimulatedParachute part = new SimulatedParachute(); part.Set(mp.part, simCurve); part.Set(mp, startTime, limitChutesStage); return(part); }
public static SimulatedParachute Borrow(ModuleParachute mp, ReentrySimulation.SimCurves simCurve, double startTime, int limitChutesStage) { SimulatedParachute part = pool.Borrow(); part.Init(mp.part, simCurve); part.Init(mp, startTime, limitChutesStage); return(part); }
private void Init(Vessel v, ReentrySimulation.SimCurves _simCurves, double startTime, int limitChutesStage) { totalMass = 0; var oParts = v.Parts; count = oParts.Count; simCurves = _simCurves; if (parts.Capacity < count) { parts.Capacity = count; } for (int i = 0; i < count; i++) { SimulatedPart simulatedPart = null; bool special = false; for (int j = 0; j < oParts[i].Modules.Count; j++) { ModuleParachute mp = oParts[i].Modules[j] as ModuleParachute; if (mp != null && v.mainBody.atmosphere) { special = true; simulatedPart = SimulatedParachute.Borrow(mp, simCurves, startTime, limitChutesStage); } } if (!special) { simulatedPart = SimulatedPart.Borrow(oParts[i], simCurves); } parts.Add(simulatedPart); totalMass += simulatedPart.totalMass; } }
private void Set(Vessel v, ReentrySimulation.SimCurves _simCurves, double startTime, int limitChutesStage) { totalMass = 0; var oParts = v.Parts; count = oParts.Count; simCurves = _simCurves; if (parts.Capacity < count) { parts.Capacity = count; } for (int i = 0; i < count; i++) { SimulatedPart simulatedPart = null; bool special = false; for (int j = 0; j < oParts[i].Modules.Count; j++) { if (oParts[i].Modules[j] is ModuleParachute) { special = true; simulatedPart = SimulatedParachute.New((ModuleParachute)oParts[i].Modules[j], simCurves, startTime, limitChutesStage); } } if (!special) { simulatedPart = SimulatedPart.New(oParts[i], simCurves); } parts.Add(simulatedPart); totalMass += simulatedPart.totalMass; } }
private static void Reset(SimulatedParachute obj) { }