public void QuitEditor(GameEvents.FromToAction <GameScenes, GameScenes> eData) { AHSettings.WriteSave(); if (HighLogic.CurrentGame.Mode == Game.Modes.MISSION_BUILDER) { Destroy(this); } }
void OnDestroy() { // Save windows position : AHSettings.SavePosition("flight_main_window_position", rectActiveConnectWindow.position); AHSettings.SavePosition("flight_map_view_window_position", rectSelectCircleTypeWindow.position); AHSettings.WriteSave(); DestroyMarkers(); RemoveToolbarButton(); GameEvents.onGUIApplicationLauncherDestroyed.Remove(RemoveToolbarButton); GameEvents.onVesselWasModified.Remove(VesselModified); GameEvents.onVesselSwitching.Remove(VesselDestroy); GameEvents.onVesselDestroy.Remove(VesselDestroy); GameEvents.OnMapEntered.Remove(EnteringMap); GameEvents.OnMapExited.Remove(ExitingMap); }
public void OnDestroy() { AHSettings.SavePosition("tracking_station_main_window_position", rectMainWindow.position); AHSettings.SavePosition("tracking_station_ship_window_position", rectEditorShipWindow.position); AHSettings.WriteSave(); if (listMarkers != null) { DestroyMarkers(); } GameEvents.onPlanetariumTargetChanged.Remove(NewTarget); GameEvents.OnMapFocusChange.Remove(NewTarget); GameEvents.CommNet.OnCommStatusChange.Remove(CommNetUpdate); // GUI RemoveToolbarButton(); GameEvents.onGUIApplicationLauncherReady.Remove(AddToolbarButton); GameEvents.onGUIApplicationLauncherDestroyed.Remove(RemoveToolbarButton); }
public void QuitEditor(GameEvents.FromToAction <GameScenes, GameScenes> eData) { AHSettings.WriteSave(); }