コード例 #1
0
 private void Start()
 {
     if (CompatibilityChecker.IsAllCompatible() && Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
コード例 #2
0
 private void Start()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
コード例 #3
0
 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;
        }
コード例 #6
0
 void Update()
 {
     FlightGUIDrawer.SetGUIActive(this, (_vessel == FlightGlobals.ActiveVessel && showGUI && showAllGUI));
 }