Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected override void Draw(GameTime gameTime)
- {
- if (CurrentProject != null)
- {
- // Clear the buffer to a color so we can write to it
- GraphicsDevice.Clear(Color.Black);
- spriteBatch.Begin();
- for (int i = 0; i < CurrentProject.Map.Layers.Count; i++)
- spriteBatch.Draw(CurrentProject.Map.Layers[i].Tex, camera.View, camera.Position, CurrentProject.Map.Layers[i].Overlay);
- spriteBatch.End();
- // Assign our graphics device to the panel in the main form
- this.Graphics.GraphicsDevice.Present(null, null, MainForm.PanelHandle);
- base.Draw(gameTime);
- }
- }
Add Comment
Please, Sign In to add comment