Пример #1
0
        public void ActivatePilot()
        {
            pilotEnabled        = true;
            vessel.OnFlyByWire -= AutoPilot;
            vessel.OnFlyByWire += AutoPilot;
            startedLanded       = vessel.Landed;

            if (!speedController)
            {
                speedController        = gameObject.AddComponent <BDAirspeedControl>();
                speedController.vessel = vessel;
            }

            speedController.Activate();

            GameEvents.onVesselDestroy.Remove(RemoveAutopilot);
            GameEvents.onVesselDestroy.Add(RemoveAutopilot);

            defaultOrbitCoords = VectorUtils.WorldPositionToGeoCoords(vessel.ReferenceTransform.position, vessel.mainBody);

            RefreshPartWindow();
        }
Пример #2
0
        public void ActivatePilot()
        {
            pilotEnabled = true;
            vessel.OnFlyByWire -= AutoPilot;
            vessel.OnFlyByWire += AutoPilot;
            startedLanded = vessel.LandedOrSplashed;

            if(!speedController)
            {
                speedController = gameObject.AddComponent<BDAirspeedControl>();
                speedController.vessel = vessel;
            }

            speedController.Activate();

            GameEvents.onVesselDestroy.Remove(RemoveAutopilot);
            GameEvents.onVesselDestroy.Add(RemoveAutopilot);

            defaultOrbitCoords = VectorUtils.WorldPositionToGeoCoords(vessel.ReferenceTransform.position, vessel.mainBody);

            RefreshPartWindow();
        }