RemoteTech.FlightComputerGUI.update C# (CSharp) Méthode

update() public méthode

public update ( ) : void
Résultat void
        public void update()
        {
            if (t <= Math.Round(Planetarium.GetUniversalTime(), 0))
            {
                t = Math.Round(Planetarium.GetUniversalTime(), 0) + 1;

                arrows += "»";
                if (arrows.Length > 4)
                    arrows = "";
            }

            throttle.update();

            if (roverMode)
                rover.update();

            foreach (AttitudeStateButton b in attitudeButtons)
                b.Update();
        }

Usage Example

Exemple #1
0
        public void Update()
        {
            if (EnergyDrain > 0)
            {
                RequestPower();
            }

            flightComputerGUI.update();

            UpdateOtherGUI();

            if (ticks++ > 100)
            {
                ticks = 0;

                UpdateOtherModules();

                Thread thread = new Thread(new ThreadStart(GetCommandPath));
                thread.Start();
            }


            if (!vessel.isActiveVessel)
            {
                return;
            }


            if (InContact && powered && RTGlobals.showPathInMapView && MapView.MapIsEnabled)
            {
                line.enabled = true;
                line.SetVertexCount(path.nodes.Count);
                for (int i = 0; i < path.nodes.Count; i++)
                {
                    line.SetPosition(i, path.nodes[i].ScaledPosition);
                }

                line.SetWidth((float)(0.005 * planetariumCamera.Distance), (float)(0.005 * planetariumCamera.Distance));
            }
            else
            {
                if (line != null)
                {
                    line.enabled = false;
                }
            }
            UpdateTriggers();
        }