/// <summary> /// Disposes the VesselManager /// </summary> public static void Dispose() { managerInstance.UnlinkEvents(); managerInstance.ActiveVessel = null; managerInstance = null; Program.AddDebugLog("Vessel Part Manager Disposed."); }
public static void Terminate() { _instance.UnlinkEvents(); _instance.ActiveVesselPartsList.Clear(); _instance.ActiveVessel = null; _instance = null; #if DEBUG Debug.Log("AGM : VesselPartManager Terminated."); #endif }
void OnDestroy() { //Terminate all UI foreach (KeyValuePair <string, UIObject> ui in UiList) { ui.Value.Terminate(); } //Save settings to disk SettingsManager.Settings.save(); VesselManager.Terminate(); #if DEBUG Debug.Log("AGM : Terminated."); #endif }
/// <summary> /// Disposes of all Action Group Manager elements. /// </summary> private void OnDestroy() { // Terminate all UI foreach (KeyValuePair <UiType, UiObject> item in this.uiList) { item.Value.Dispose(); } GameEvents.OnGameSettingsApplied.Remove(this.OnSettingsApplied); GameEvents.onHideUI.Remove(this.HideUI); GameEvents.onGameSceneSwitchRequested.Remove(this.ResetWindows); // Save settings to disk SettingsManager.Save(); VesselManager.Dispose(); Program.AddDebugLog("Visual User Interface Terminated."); }
public PartFilter() { manager = VesselManager.Instance; Initialize(); }