Guest User

Untitled

a guest
May 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. for (int i = ys; i < ye; i++) {
  2. for (int j = xs; j < xe; j++) {
  3. if (stage.Map[i, j].TileType == 1) {
  4. World = Matrix.CreateTranslation(stage.Map[i, j].TilePosition);
  5. spriterender.World = World;
  6. spriterender.View = camera.ViewMatrix;
  7. spriterender.Projection = camerea.ProjectionMatrix;
  8. GraphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, 24, 0, 36 / 3);
  9. } else if (stage.Map[i, j].TileType == 0 || stage.Map[i, j].TileType == 3) {
  10.  
  11. World = Matrix.CreateRotationX(MathHelper.ToRadians(180)) *
  12. Matrix.CreateTranslation(new Vector3(stage.Map[i, j].TilePosition.X, -2, stage.Map[i, j].TilePosition.Z));
  13. spriterender.World = World;
  14. spriterender.View = camera.ViewMatrix;
  15. spriterender.Projection = camerea.ProjectionMatrix;
  16. GraphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, 3, 0, 2);
  17. }
  18. }
  19. }
Add Comment
Please, Sign In to add comment