Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = ys; i < ye; i++) {
- for (int j = xs; j < xe; j++) {
- if (stage.Map[i, j].TileType == 1) {
- World = Matrix.CreateTranslation(stage.Map[i, j].TilePosition);
- spriterender.World = World;
- spriterender.View = camera.ViewMatrix;
- spriterender.Projection = camerea.ProjectionMatrix;
- GraphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, 24, 0, 36 / 3);
- } else if (stage.Map[i, j].TileType == 0 || stage.Map[i, j].TileType == 3) {
- World = Matrix.CreateRotationX(MathHelper.ToRadians(180)) *
- Matrix.CreateTranslation(new Vector3(stage.Map[i, j].TilePosition.X, -2, stage.Map[i, j].TilePosition.Z));
- spriterender.World = World;
- spriterender.View = camera.ViewMatrix;
- spriterender.Projection = camerea.ProjectionMatrix;
- GraphicsDevice.DrawIndexedPrimitives(PrimitiveType.TriangleList, 0, 0, 3, 0, 2);
- }
- }
- }
Add Comment
Please, Sign In to add comment