Guest User

Untitled

a guest
Aug 19th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. protected override void Draw(GameTime gameTime)
  2. {
  3. if (CurrentProject != null)
  4. {
  5. // Clear the buffer to a color so we can write to it
  6. GraphicsDevice.Clear(Color.Black);
  7.  
  8. spriteBatch.Begin();
  9.  
  10. for (int i = 0; i < CurrentProject.Map.Layers.Count; i++)
  11. spriteBatch.Draw(CurrentProject.Map.Layers[i].Tex, camera.View, camera.Position, CurrentProject.Map.Layers[i].Overlay);
  12.  
  13. spriteBatch.End();
  14.  
  15. // Assign our graphics device to the panel in the main form
  16. this.Graphics.GraphicsDevice.Present(null, null, MainForm.PanelHandle);
  17. base.Draw(gameTime);
  18. }
  19. }
Add Comment
Please, Sign In to add comment