only draw FPS when debug enabled
GitOrigin-RevId: 22783521cbfeb8e7cd672b1bc269acd4c933734c
This commit is contained in:
parent
caa9b074d5
commit
67e952d64f
@ -139,9 +139,13 @@ namespace Jumpy {
|
||||
Rectangle drawRect = new Rectangle(
|
||||
0, 0, GraphicsDevice.Viewport.Width, GraphicsDevice.Viewport.Height);
|
||||
spriteBatch.Draw(renderTarget, drawRect, Color.White);
|
||||
string fpsText = $"{GraphicsDevice.Viewport.Width}x{GraphicsDevice.Viewport.Height}, " +
|
||||
$"{fpsCounter.Fps} FPS";
|
||||
spriteBatch.DrawString(font, fpsText, new Vector2(10, 10), Color.White);
|
||||
|
||||
if (Debug.Enabled) {
|
||||
string fpsText = $"{GraphicsDevice.Viewport.Width}x{GraphicsDevice.Viewport.Height}, " +
|
||||
$"{fpsCounter.Fps} FPS";
|
||||
spriteBatch.DrawString(font, fpsText, new Vector2(10, 10), Color.White);
|
||||
}
|
||||
|
||||
spriteBatch.End();
|
||||
|
||||
base.Draw(gameTime);
|
||||
|
Loading…
Reference in New Issue
Block a user