Пример #1
0
 public void OnDestroy()
 {
     //if (SpaceCenter.Instance.isActiveAndEnabled) // Fix on load RSS deletions!
     if (HighLogic.LoadedScene != GameScenes.FLIGHT &&
         Planetarium.GetUniversalTime() != HighLogic.CurrentGame.UniversalTime)
     {
         return;
     }
     if ((HighLogic.LoadedScene != GameScenes.SPACECENTER &&
          HighLogic.LoadedScene != GameScenes.TRACKSTATION &&
          HighLogic.LoadedScene != GameScenes.FLIGHT))
     {
         return;
     }
     SCSData.SaveInfo();
     print("WhitecatIndustries SCS - Saving to .cfg");
 }
Пример #2
0
        public void Start()
        {
            CycleCount  = 0;
            SolarCycles = new ConfigNode();

            if ((HighLogic.LoadedScene == GameScenes.SPACECENTER || HighLogic.LoadedScene == GameScenes.TRACKSTATION || HighLogic.LoadedScene == GameScenes.FLIGHT))
            {
                SecondsInYear = KerbinTime ? 9203545 : 31557600;

                SCSData.LoadInfo();
                print("WhitecatIndustries SCS - Solar Cycle Data Loaded");


                // print("Cycle Count " + CycleCount);

                if (CycleCount < 1)
                {
                    StartNewCycle();
                }
            }
        }