コード例 #1
0
ファイル: AscentAP.cs プロジェクト: trueppp/krpcmj
        public static void AscentIntoPlane()
        {
            MechJebCore activejeb = GetJeb();

            if (activejeb != null)
            {
                MechJebModuleAscentAutopilot activeasc = activejeb.GetComputerModule("MechJebModuleAscentAutopilot") as MechJebModuleAscentAutopilot;
                if (activeasc != null)
                {
                    activeasc.StartCountdown(activeasc.vesselState.time + LaunchTiming.TimeToPlane(activeasc.launchLANDifference, activeasc.vessel.mainBody, activeasc.vesselState.latitude, activeasc.vesselState.longitude, activeasc.core.target.TargetOrbit));
                    activeasc.enabled = true;
                }
            }
        }
コード例 #2
0
ファイル: AscentAP.cs プロジェクト: trueppp/krpcmj
        public static void AscentRdzv(KRPC.SpaceCenter.Services.Vessel Targ)
        {
            MechJebCore activejeb = GetJeb();

            if (activejeb != null)
            {
                MechJebModuleAscentAutopilot activeasc = activejeb.GetComputerModule("MechJebModuleAscentAutopilot") as MechJebModuleAscentAutopilot;
                if (activeasc != null)
                {
                    activeasc.core.target.Set(Targ.InternalVessel);
                    activeasc.core.vessel.targetObject = Targ.InternalVessel;
                    activeasc.StartCountdown(activeasc.vesselState.time + LaunchTiming.TimeToPhaseAngle(activeasc.launchPhaseAngle, activeasc.vessel.mainBody, activeasc.vessel.longitude, activeasc.core.target.TargetOrbit));
                    activeasc.enabled = true;
                }
            }
        }