Browse Source

gate toasts behind Debug.Enabled, rearrange their position & color

GitOrigin-RevId: 4efcd95c30
master
Colin McMillen 4 years ago
parent
commit
7ed88960a5
  1. 2
      Jumpy.Shared/Camera.cs
  2. 2
      Jumpy.Shared/Debug.cs
  3. 5
      Jumpy.Shared/JumpyGame.cs

2
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}");
}
}
}

2
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;
}

5
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);

Loading…
Cancel
Save