Guest User

Untitled

a guest
Jul 17th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. protected override void Draw(GameTime gameTime)
  2. {
  3. GraphicsDevice.Clear(Color.CornflowerBlue);
  4.  
  5. spriteBatch.Begin(SpriteBlendMode.AlphaBlend);
  6.  
  7. for (int y = 0; y < map.GetLength(0); y++)
  8. {
  9. for (int x = 0; x < map.GetLength(1); x++)
  10. {
  11. spriteBatch.Draw(tiles[map[y, x]],
  12. new Rectangle(
  13. x * tileWidht,
  14. y * tileHeight,
  15. tileWidht,
  16. tileHeight),
  17. Color.White);
  18. }
  19. }
  20.  
  21. base.Draw(gameTime);
  22.  
  23. spriteBatch.End();
  24. }
Add Comment
Please, Sign In to add comment