private void Start()
 {
     if (CompatibilityChecker.IsAllCompatible() && Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
 private void Start()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
 void Start()
 {
     if (CompatibilityChecker.IsAllCompatible() && instance == null)
     {
         instance = this;
     }
     else
     {
         GameObject.Destroy(this);
         return;
     }
 }
Пример #4
0
 private void Update()
 {
     FlightGUIDrawer.SetGUIActive(this, _vessel == FlightGlobals.ActiveVessel && showGUI && showAllGUI);
     if (frameCountForSaving >= 120)
     {
         SaveActiveData();
         frameCountForSaving = 0;
     }
     else
     {
         frameCountForSaving++;
     }
 }
Пример #5
0
        void OnDestroy()
        {
            FlightGUIDrawer.SetGUIActive(this, false);
            GameEvents.onShowUI.Remove(ShowUI);
            GameEvents.onHideUI.Remove(HideUI);
            SaveConfigs();
            if (_vessel)
            {
                vesselFlightGUI.Remove(_vessel);
            }
            _physicsCalcs = null;

            if (_flightDataGUI != null)
            {
                _flightDataGUI.SaveSettings();
            }
            _flightDataGUI = null;

            if (_stabilityAugmentation != null)
            {
                _stabilityAugmentation.SaveAndDestroy();
            }
            _stabilityAugmentation = null;

            if (_airSpeedGUI != null)
            {
                _airSpeedGUI.SaveSettings();
            }
            _airSpeedGUI = null;

            if (_aeroVizGUI != null)
            {
                _aeroVizGUI.SaveSettings();
            }

            _flightStatusGUI = null;
            settingsWindow   = null;

            activeFlightGUICount--;

            if (activeFlightGUICount <= 0)
            {
                activeFlightGUICount = 0;
                if (blizzyFlightGUIButton != null)
                {
                    ClearBlizzyToolbarButton();
                }
            }

            savedShowGUI = showGUI;
        }
 void Update()
 {
     FlightGUIDrawer.SetGUIActive(this, (_vessel == FlightGlobals.ActiveVessel && showGUI && showAllGUI));
 }