public void EnableFogOfWar(bool flag) { if (flag) { Main.Logger.LogDebug($"[BTDebug] Turning Fog of War is ON"); IsFogOfWarOn = true; EnablePilotableActorsFoW(); if (IsFogOfWarOverlayDisableable) { EnableOverlay(); } } else { Main.Logger.LogDebug($"[BTDebug] Turning Fog of War is OFF"); IsFogOfWarOn = false; DisablePilotableActorsFoW(); if (IsFogOfWarOverlayDisableable) { DisableOverlay(); } } GizmoManager.GetInstance().UpdateBoundaryColour(); }
public static GizmoManager GetInstance() { if (instance == null) { instance = new GizmoManager(); } return(instance); }
static void Prefix(EncounterLayerParent __instance, MessageCenterMessage message) { Main.Logger.Log($"[EncounterLayerParentInitializeContractPatch Prefix] Patching InitializeContract"); InitializeContractMessage initializeContractMessage = message as InitializeContractMessage; CombatGameState combat = initializeContractMessage.combat; Contract activeContract = combat.ActiveContract; GizmoManager.GetInstance().SetContract(activeContract); }
static void Postfix(RegionGameLogic __instance) { if (GizmoManager.GetInstance().IsGizmoModeActive&& GizmoManager.GetInstance().IsGizmoRegionModeActive) { MeshRenderer component = __instance.GetComponent <MeshRenderer>(); if (component != null) { component.enabled = true; } } }
static void Postfix(UnityGameInstance __instance) { if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.D)) { string indentation = ""; Main.Logger.LogDebug($"[BTDebug] Outting all game objects and components"); GameObject[] rootGos = UnityEngine.SceneManagement.SceneManager.GetActiveScene().GetRootGameObjects(); foreach (GameObject go in rootGos) { RecursivePrintGameObject(go, indentation); } } if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.I)) { InspectorManager.GetInstance().ToggleInspector(); } if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.A)) { InspectorManager.GetInstance().ToggleDebugMode(); } if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.F)) { Main.Logger.LogDebug($"[BTDebug] Toggling Fog of War"); FogOfWarManager.GetInstance().ToggleFogOfWar(); } if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.C)) { Main.Logger.LogDebug($"[BTDebug] Toggling Freeform Camera"); CameraManager.GetInstance().ToggleFreeformCamera(); } if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.G)) { Main.Logger.LogDebug($"[BTDebug] Toggling Gizmos"); GizmoManager.GetInstance().ToggleGizmos(); } if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.R)) { Main.Logger.LogDebug($"[BTDebug] Toggling Gizmos Regions"); GizmoManager.GetInstance().ToggleGizmoRegionMode(); } }
static void Postfix(UnityGameInstance __instance) { if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.I)) { InspectorManager.GetInstance().ToggleInspector(); } if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.A)) { InspectorManager.GetInstance().ToggleDebugMode(); } if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.F)) { Main.Logger.LogDebug($"[BTDebug] Toggling Fog of War"); FogOfWarManager.GetInstance().ToggleFogOfWar(); } if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.C)) { Main.Logger.LogDebug($"[BTDebug] Toggling Freeform Camera"); CameraManager.GetInstance().ToggleFreeformCamera(); } if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.U)) { Main.Logger.LogDebug($"[BTDebug] Toggling User Interface"); CameraManager.GetInstance().ToggleUi(); } if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.G)) { Main.Logger.LogDebug($"[BTDebug] Toggling Gizmos"); GizmoManager.GetInstance().ToggleGizmos(); } if ((Input.GetKey(KeyCode.LeftAlt) || Input.GetKey(KeyCode.RightAlt)) && Input.GetKeyDown(KeyCode.R)) { Main.Logger.LogDebug($"[BTDebug] Toggling Gizmos Regions"); GizmoManager.GetInstance().ToggleGizmoRegionMode(); } }