示例#1
0
 public void SetVTOLThrust()
 {
     thrustMode = WBIThrustModes.VTOL;
     for (int index = 0; index < thrustVectorControllers.Length; index++)
     {
         thrustVectorControllers[index].SetVTOLThrust(this);
     }
 }
示例#2
0
        public void FindThrustVectorControllers()
        {
            List <IThrustVectorController> controllers = FlightGlobals.ActiveVessel.FindPartModulesImplementing <IThrustVectorController>();

            if (controllers == null)
            {
                return;
            }
            if (controllers.Count > 0)
            {
                thrustVectorControllers = controllers.ToArray();
                thrustMode = thrustVectorControllers[0].GetThrustMode();
            }
        }
示例#3
0
        public void ToggleHover()
        {
            if (hoverControllers.Length == 0)
            {
                return;
            }
            hoverActive = !hoverActive;
            if (!hoverActive)
            {
                verticalSpeed = 0f;
            }

            //Set hover mode
            //We actually DON'T want to calculate the throttle setting because other engines that aren't in hover mode might need it.
            for (int index = 0; index < hoverControllers.Length; index++)
            {
                hoverControllers[index].SetHoverMode(hoverActive);
            }
            if (thrustVectorControllers != null)
            {
                thrustMode = thrustVectorControllers[0].GetThrustMode();
            }
        }