예제 #1
0
 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;
 }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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;
            }
        }
예제 #5
0
        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;
            }
        }
예제 #6
0
 private static void Reset(SimulatedParachute obj)
 {
 }
 private static void Reset(SimulatedParachute obj)
 {
 }