From 50479bac3c6da501b5fe7b7ee0b9d45f1f503fbe Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Wed, 29 Jan 2020 16:33:55 -0500 Subject: [PATCH] while paused, don't clear the list of Debug rects & lines GitOrigin-RevId: d298abc6ad4d7808da927a20c726cab6a65dc61c --- Shared/Debug.cs | 8 +++++--- Shared/SneakGame.cs | 3 +-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Shared/Debug.cs b/Shared/Debug.cs index 0310784..6241e38 100644 --- a/Shared/Debug.cs +++ b/Shared/Debug.cs @@ -47,10 +47,12 @@ namespace SemiColinGames { System.Diagnostics.Debug.WriteLine(s, args); } - public static void Clear() { + public static void Clear(bool paused) { toasts.Clear(); - rects.Clear(); - lines.Clear(); + if (!paused) { + rects.Clear(); + lines.Clear(); + } } public static void AddToast(string s) { diff --git a/Shared/SneakGame.cs b/Shared/SneakGame.cs index bee7f36..de89bfc 100644 --- a/Shared/SneakGame.cs +++ b/Shared/SneakGame.cs @@ -69,8 +69,6 @@ namespace SemiColinGames { // Updates the game world. protected override void Update(GameTime gameTime) { - Debug.Clear(); - input.Add(new Input(GamePad.GetState(PlayerIndex.One), Keyboard.GetState())); if (input[0].Exit) { @@ -86,6 +84,7 @@ namespace SemiColinGames { display.SetFullScreen(fullScreen); } + Debug.Clear(paused); if (input[0].Debug && !input[1].Debug) { Debug.Enabled = !Debug.Enabled; }