From 7ed88960a5164e669819409cbd46c59400ecc516 Mon Sep 17 00:00:00 2001 From: Colin McMillen Date: Tue, 17 Dec 2019 18:04:06 -0500 Subject: [PATCH] gate toasts behind Debug.Enabled, rearrange their position & color GitOrigin-RevId: 4efcd95c3034a51f224fdc452d525b2e20057354 --- Jumpy.Shared/Camera.cs | 2 +- Jumpy.Shared/Debug.cs | 2 +- Jumpy.Shared/JumpyGame.cs | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Jumpy.Shared/Camera.cs b/Jumpy.Shared/Camera.cs index 3900c24..9ae7d4c 100644 --- a/Jumpy.Shared/Camera.cs +++ b/Jumpy.Shared/Camera.cs @@ -20,7 +20,7 @@ namespace Jumpy { if (bbox.Left < 0) { bbox.Offset(-bbox.Left, 0); } - // Debug.Toast($"p: {player.X} c: {bbox.Center.X}"); + Debug.Toast($"p: {player.X}, {player.Y} c: {bbox.Center.X}"); } } } diff --git a/Jumpy.Shared/Debug.cs b/Jumpy.Shared/Debug.cs index 5710d6f..4b7dda0 100644 --- a/Jumpy.Shared/Debug.cs +++ b/Jumpy.Shared/Debug.cs @@ -50,7 +50,7 @@ namespace Jumpy { if (toast == null) { return; } - spriteBatch.DrawString(font, toast, new Vector2(10, 10), Color.YellowGreen); + spriteBatch.DrawString(font, toast, new Vector2(10, 40), Color.Teal); toast = null; } diff --git a/Jumpy.Shared/JumpyGame.cs b/Jumpy.Shared/JumpyGame.cs index 0216b2b..009eaa1 100644 --- a/Jumpy.Shared/JumpyGame.cs +++ b/Jumpy.Shared/JumpyGame.cs @@ -148,11 +148,10 @@ namespace Jumpy { if (Debug.Enabled) { string fpsText = $"{GraphicsDevice.Viewport.Width}x{GraphicsDevice.Viewport.Height}, " + $"{fpsCounter.Fps} FPS"; - spriteBatch.DrawString(font, fpsText, new Vector2(10, 40), Color.YellowGreen); + spriteBatch.DrawString(font, fpsText, new Vector2(10, 10), Color.Teal); + Debug.DrawToast(spriteBatch, font); } - Debug.DrawToast(spriteBatch, font); - spriteBatch.End(); base.Draw(gameTime);