/// <summary> /// This is called when the game should draw itself. /// </summary> /// <param name="gameTime">Provides a snapshot of timing values.</param> protected override void Draw(GameTime gameTime) { GraphicsDevice.Clear(Color.CornflowerBlue); //spriteBatch.Begin(SpriteSortMode.Immediate, null, null, null, null, null, camera.GetTransformMatrix()); gameWorld.Draw(spriteBatch, camera); //spriteBatch.End(); spriteBatch.Begin(); uiRoot.Draw(spriteBatch); spriteBatch.End(); //spriteBatch.Begin(); //spriteBatch.DrawString(font, $"FPS: {frameCounter.GetFps()}", Vector2.Zero, Color.White); //spriteBatch.End(); frameCounter.Reset(); base.Draw(gameTime); }