applyLocks() public static method

public static applyLocks ( ) : void
return void
Esempio n. 1
0
        public void Update()
        {
            if (HighLogic.fetch == null)
            {
                return;
            }

            try
            {
                if (HighLogic.LoadedSceneIsFlight)
                {
                    doOnce = true;
                    if (RTGlobals.Manager == null)
                    {
                        RTGlobals.Manager = (OrbitPhysicsManager)GameObject.FindObjectOfType(typeof(OrbitPhysicsManager));
                    }

                    try
                    {
                        if (GameSettings.MODIFIER_KEY.GetKey() && Input.GetKeyDown(RTGlobals.settingsKey))
                        {
                            coreSettings.Toggle();
                        }
                    }
                    catch { }

                    if (this.vessels != FlightGlobals.Vessels.Count)
                    {
                        RTGlobals.network = new RelayNetwork();
                        this.vessels      = FlightGlobals.Vessels.Count;
                    }

                    RTGlobals.coreList.update();

                    if (RTGlobals.coreList.activeVesselIsRemoteTech)
                    {
                        RTUtils.applyLocks();
                    }
                    else
                    {
                        RTUtils.removeLocks();
                    }
                }
                else if (doOnce)
                {
                    RTGlobals.coreList.Clear();
                    RTGlobals.coreList.activeVesselIsRemoteTech = doOnce = false;
                    RTUtils.removeLocks();
                }
            }
            catch { }

            if (GUIcreated && !HighLogic.LoadedSceneIsFlight)
            {
                destroyGUI();
            }
        }