I have a camera in my 2D side scrolling game and I want to implement the GUI. How can I do that?
For the moment, I draw everything like this:
spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.AnisotropicClamp, DepthStencilState.None, RasterizerState.CullNone, null, scaleMatrix * camera.GetMatrix()); player.Render(spriteBatch); GUI.Render(spriteBatch); ... spriteBatch.End();
Should I separate the GUI drawing code from the camera's transformation matrix? How can I do that? What is the best way to implement the GUI in a Windows Phone 8 project?