From 44bd3c689640207626f1b235aba0015a5419d79f Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Wed, 19 Feb 2020 15:08:42 -0500 Subject: [PATCH] Show lines of sight only when Debug enabled GitOrigin-RevId: 77de51cce5e9e6a009a866e0eb5bc213f00b176c --- Shared/Scene.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Shared/Scene.cs b/Shared/Scene.cs index 3e70022..4199ee6 100644 --- a/Shared/Scene.cs +++ b/Shared/Scene.cs @@ -80,7 +80,9 @@ namespace SemiColinGames { graphics.SetRenderTarget(lightingTarget); graphics.Clear(new Color(0, 0, 0, 0f)); lightingEffect.Projection = camera.Projection; - linesOfSight.Draw(player, world.CollisionTargets, graphics, lightingEffect); + if (Debug.Enabled) { + linesOfSight.Draw(player, world.CollisionTargets, graphics, lightingEffect); + } // Draw debug rects & lines on top. Debug.Draw(graphics, lightingEffect);