Example #1
0
        public void Shutdown()
        {
            instance = null;
            GameEvents.onKerbalStatusChange.Remove(onKerbalStatusChange);
            GameEvents.onCrewTransferred.Remove(onCrewTransferred);
            GameEvents.onVesselCreate.Remove(onVesselCreate);
            GameEvents.onVesselDestroy.Remove(onVesselDestroy);
            GameEvents.onVesselWasModified.Remove(onVesselWasModified);
            GameEvents.onGameStateCreated.Remove(onGameStateCreated);

            ProgenyScenario.onProgenyScenarioLoaded.Remove(onProgenyScenarioLoaded);
        }
Example #2
0
        public ProgenyTracker(KerbalStats ks)
        {
            instance = this;
            Clear();
            GameEvents.onKerbalStatusChange.Add(onKerbalStatusChange);
            GameEvents.onCrewTransferred.Add(onCrewTransferred);
            GameEvents.onVesselCreate.Add(onVesselCreate);
            GameEvents.onVesselDestroy.Add(onVesselDestroy);
            GameEvents.onVesselWasModified.Add(onVesselWasModified);
            GameEvents.onGameStateCreated.Add(onGameStateCreated);

            ProgenyScenario.onProgenyScenarioLoaded.Add(onProgenyScenarioLoaded);

            if (!HighLogic.LoadedSceneIsEditor)
            {
                KerbalStats.current.StartCoroutine(WaitAndCheckLocations());
            }
        }