void Awake() { enabled = false; instance = this; StartCoroutine(CheckActionGroupEditor()); GameEvents.onEditorLoad.Add(onEditorLoad); }
void OnDestroy() { GameEvents.onPartAttach.Remove(onPartAttach); GameEvents.onPartRemove.Remove(onPartRemove); GameEvents.onEditorShipModified.Remove(onEditorShipModified); GameEvents.onPartActionUIDismiss.Remove(OnPartActionGuiDismiss); GameEvents.onPartActionUIShown.Remove(OnPartActionUIShown); TankWindow.HideGUI(); }
void Awake() { enabled = false; if (CompatibilityChecker.IsWin64()) { return; } instance = this; StartCoroutine(CheckActionGroupEditor()); }
public void Update() { if (!compatible || !HighLogic.LoadedSceneIsEditor) { return; } UpdateTankType(); UpdateUtilization(); CalculateMass(); EditorLogic editor = EditorLogic.fetch; if (editor.editorScreen == EditorScreen.Actions && EditorActionGroups.Instance.GetSelectedParts().Contains(part)) { TankWindow.ShowGUI(this); } }
public void Update() { if (!compatible || !HighLogic.LoadedSceneIsEditor) { return; } UpdateTankType(); UpdateUtilization(); CalculateMass(); bool inEditorActionsScreen = (EditorLogic.fetch?.editorScreen == EditorScreen.Actions); bool partIsSelectedInActionsScreen = inEditorActionsScreen && (EditorActionGroups.Instance?.GetSelectedParts().Contains(part) ?? false); if (partIsSelectedInActionsScreen) { TankWindow.ShowGUI(this); } }
public void Update() { if (compatible && HighLogic.LoadedSceneIsEditor) { UpdateTankType(); UpdateUtilization(); CalculateMass(); bool inEditorActionsScreen = (EditorLogic.fetch?.editorScreen == EditorScreen.Actions); bool partIsSelectedInActionsScreen = inEditorActionsScreen && (EditorActionGroups.Instance?.GetSelectedParts().Contains(part) ?? false); if (partIsSelectedInActionsScreen || showUI) { TankWindow.ShowGUI(this); } else { TankWindow.HideGUIForModule(this); } } UpdateRF(); }
public void ShowUI() { TankWindow.ShowGUI(this); UpdateMenus(true); }
public void HideUI() { TankWindow.HideGUI(); UpdateMenus(false); }
void OnDestroy() { instance = null; }
void OnDestroy() { instance = null; GameEvents.onEditorLoad.Remove(onEditorLoad); }
void Awake() { enabled = false; if (CompatibilityChecker.IsWin64 ()) { return; } instance = this; StartCoroutine (CheckActionGroupEditor ()); }
void Awake() { enabled = false; instance = this; StartCoroutine (CheckActionGroupEditor ()); }
void Awake() { enabled = false; instance = this; StartCoroutine(CheckActionGroupEditor()); }