예제 #1
0
 static void Prefix(PilotableActorRepresentation __instance, ref VisibilityLevel newLevel)
 {
     if (!FogOfWarManager.GetInstance().IsFogOfWarOn)
     {
         newLevel = VisibilityLevel.LOSFull;
     }
 }
 static void Prefix(PilotableActorRepresentation __instance, ref VisibilityLevel newLevel)
 {
     if (!FogOfWarManager.GetInstance().IsFogOfWarOn)
     {
         Main.Logger.LogDebug($"[BTDebug] Running PilotableActorRepresentation Prefix for Fog of War");
         newLevel = VisibilityLevel.LOSFull;
     }
 }
예제 #3
0
 public static FogOfWarManager GetInstance()
 {
     if (instance == null)
     {
         instance = new FogOfWarManager();
     }
     return(instance);
 }
예제 #4
0
 public void UpdateBoundaryColour()
 {
     if (FogOfWarManager.GetInstance().IsFogOfWarOn)
     {
         boundaryMaterial.color = new Color(255f / 255f, 100f / 255f, 100f / 255f, 80f / 255f);
     }
     else
     {
         boundaryMaterial.color = new Color(255f / 255f, 100f / 255f, 100f / 255f, 140f / 255f);
     }
 }
예제 #5
0
        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();
            }
        }
예제 #6
0
        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();
            }
        }