Ejemplo n.º 1
0
 public GUIcontainer(FlightComputerGUI input, int ATid, int THid)
 {
     this.gui         = input;
     this.ATTITUDE_ID = ATid;
     this.THROTTLE_ID = THid;
     AttitudePos      = new Rect((Screen.width / 2) - 132, Screen.height / 2, 100, 200);
     ThrottlePos      = new Rect((Screen.width / 2) - 109, (Screen.height / 2) - 133, 100, 200);
 }
Ejemplo n.º 2
0
 public AttitudeStateButton(FlightComputerGUI computerin, AttitudeMode modein, string namein)
 {
     this.computer = computerin;
     this.mode     = modein;
     this.name     = namein;
     if (mode == AttitudeMode.SURFACE)
     {
         HDG  = PIT = 90;
         HDGs = PITs = HDG.ToString();
         ROL  = 0;
         ROLs = ROL.ToString();
     }
 }
Ejemplo n.º 3
0
 public AttitudeStateButton(FlightComputerGUI computerin, AttitudeMode modein, string namein)
 {
     this.computer = computerin;
     this.mode = modein;
     this.name = namein;
     if (mode == AttitudeMode.SURFACE)
     {
         HDG = PIT = 90;
         HDGs = PITs = HDG.ToString();
         ROL = 0;
         ROLs = ROL.ToString();
     }
 }
Ejemplo n.º 4
0
        public RemoteCore(Vessel v, float energyDrain)
        {
            if (v == null)
            {
                return;
            }
            vessel           = v;
            this.EnergyDrain = energyDrain;

            settings          = new SatSettings(this);
            computer          = new FlightComputer(this);
            flightComputerGUI = new FlightComputerGUI(this);

            Rnode = new RelayNode(vessel);

            try
            {
                vessel.OnFlyByWire -= new FlightInputCallback(this.drive);
            }
            catch { }
            try
            {
                vessel.OnFlyByWire += new FlightInputCallback(this.drive);
            }
            catch { }

            GetCommandPath();

            UpdateOtherModules();

            planetariumCamera = (PlanetariumCamera)GameObject.FindObjectOfType(typeof(PlanetariumCamera));

            obj = new GameObject("Line");

            line = null;

            obj.layer          = 9;
            line               = obj.AddComponent <LineRenderer>();
            line.useWorldSpace = true;
            line.material      = new Material(Shader.Find("Particles/Additive"));
            line.SetColors(Color.blue, Color.blue);
            line.SetWidth(0, 0);

            localControl = vessel.GetCrewCount() > 0 || MechJeb;
        }
Ejemplo n.º 5
0
        public RemoteCore(Vessel v, float energyDrain)
        {
            if (v == null) return;
            vessel = v;
            this.EnergyDrain = energyDrain;

            settings = new SatSettings(this);
            computer = new FlightComputer(this);
            flightComputerGUI = new FlightComputerGUI(this);

            Rnode = new RelayNode(vessel);

            try
            {
                vessel.OnFlyByWire -= new FlightInputCallback(this.drive);
            }
            catch { }
            try
            {
                vessel.OnFlyByWire += new FlightInputCallback(this.drive);
            }
            catch { }

            GetCommandPath();

            UpdateOtherModules();

            planetariumCamera = (PlanetariumCamera)GameObject.FindObjectOfType(typeof(PlanetariumCamera));

            obj = new GameObject("Line");

            line = null;

            obj.layer = 9;
            line = obj.AddComponent<LineRenderer>();
            line.useWorldSpace = true;
            line.material = new Material(Shader.Find("Particles/Additive"));
            line.SetColors(Color.blue, Color.blue);
            line.SetWidth(0, 0);

            localControl = vessel.GetCrewCount() > 0 || MechJeb;
        }
Ejemplo n.º 6
0
 public SimpleThrottle(FlightComputerGUI computerin)
 {
     this.computer = computerin;
     state.Target  = -10;
 }
Ejemplo n.º 7
0
 public roverControl(FlightComputerGUI computerin)
 {
     this.computer = computerin;
 }
Ejemplo n.º 8
0
 public SimpleThrottle(FlightComputerGUI computerin)
 {
     this.computer = computerin;
     state.Target = -10;
 }
Ejemplo n.º 9
0
 public roverControl(FlightComputerGUI computerin)
 {
     this.computer = computerin;
 }