public static Objects.Plane levelCompleted(string textureName, double width, double height, double positionX, double positionY, double positionZ) { Objects.Plane p = new Objects.Plane(); Objects.Rectangle r = new Objects.Rectangle(); p.textureName = @"Img\Texture\UserInterface\" + textureName; p.repeat = false; r.points[0][0] = 10 - positionX; r.points[0][1] = 10 - positionY; r.points[0][2] = -positionZ; r.points[1][0] = 10 - width - positionX; r.points[1][1] = 10 - positionY; r.points[1][2] = -positionZ; r.points[2][0] = 10 - width - positionX; r.points[2][1] = 10 - height - positionY; r.points[2][2] = -positionZ; r.points[3][0] = 10 - positionX; r.points[3][1] = 10 - height - positionY; r.points[3][2] = -positionZ; p.rectangles.Add(r); return(p); }
private static Objects.Plane plane(string textureName) { Objects.Plane p = new Objects.Plane(); Objects.Rectangle r = new Objects.Rectangle(); p.textureName = textureName; p.repeat = false; r.points[0][0] = 10; r.points[0][1] = 10; r.points[0][2] = 0; r.points[1][0] = -10; r.points[1][1] = 10; r.points[1][2] = 0; r.points[2][0] = -10; r.points[2][1] = -10; r.points[2][2] = 0; r.points[3][0] = 10; r.points[3][1] = -10; r.points[3][2] = 0; p.rectangles.Add(r); return(p); }
public static Objects.Plane levelCompleted(string textureName, double width, double height, double positionX, double positionY, double positionZ) { Objects.Plane p = new Objects.Plane(); Objects.Rectangle r = new Objects.Rectangle(); p.textureName = @"Img\Texture\UserInterface\" + textureName; p.repeat = false; r.points[0][0] = 10 - positionX; r.points[0][1] = 10 - positionY; r.points[0][2] = -positionZ; r.points[1][0] = 10 - width - positionX; r.points[1][1] = 10 - positionY; r.points[1][2] = -positionZ; r.points[2][0] = 10 - width - positionX; r.points[2][1] = 10 - height - positionY; r.points[2][2] = -positionZ; r.points[3][0] = 10 - positionX; r.points[3][1] = 10 - height - positionY; r.points[3][2] = -positionZ; p.rectangles.Add(r); return p; }
private static Objects.Plane plane(string textureName) { Objects.Plane p = new Objects.Plane(); Objects.Rectangle r = new Objects.Rectangle(); p.textureName = textureName; p.repeat = false; r.points[0][0] = 10; r.points[0][1] = 10; r.points[0][2] = 0; r.points[1][0] = -10; r.points[1][1] = 10; r.points[1][2] = 0; r.points[2][0] = -10; r.points[2][1] = -10; r.points[2][2] = 0; r.points[3][0] = 10; r.points[3][1] = -10; r.points[3][2] = 0; p.rectangles.Add(r); return p; }
public static Objects.Plane levelCompleted(string textureName, bool isButton, double positionX, double positionY) { Objects.Plane p = new Objects.Plane(); Objects.Rectangle r = new Objects.Rectangle(); p.textureName = @"Img\Texture\UserInterface\" + textureName; p.repeat = false; if (!isButton) { r.points[0][0] = 10; r.points[0][1] = 10; r.points[0][2] = 0; r.points[1][0] = -10; r.points[1][1] = 10; r.points[1][2] = 0; r.points[2][0] = -10; r.points[2][1] = -10; r.points[2][2] = 0; r.points[3][0] = 10; r.points[3][1] = -10; r.points[3][2] = 0; p.rectangles.Add(r); } else { r.points[0][0] = 10 - positionX; r.points[0][1] = 10 - positionY; r.points[0][2] = -0.1; r.points[1][0] = 7.5 - positionX; r.points[1][1] = 10 - positionY; r.points[1][2] = -0.1; r.points[2][0] = 7.5 - positionX; r.points[2][1] = 9 - positionY; r.points[2][2] = -0.1; r.points[3][0] = 10 - positionX; r.points[3][1] = 9 - positionY; r.points[3][2] = -0.1; p.rectangles.Add(r); } return(p); }
public static Objects.Plane levelCompleted(string textureName, bool isButton, double positionX, double positionY) { Objects.Plane p = new Objects.Plane(); Objects.Rectangle r = new Objects.Rectangle(); p.textureName = @"Img\Texture\UserInterface\" + textureName; p.repeat = false; if (!isButton) { r.points[0][0] = 10; r.points[0][1] = 10; r.points[0][2] = 0; r.points[1][0] = -10; r.points[1][1] = 10; r.points[1][2] = 0; r.points[2][0] = -10; r.points[2][1] = -10; r.points[2][2] = 0; r.points[3][0] = 10; r.points[3][1] = -10; r.points[3][2] = 0; p.rectangles.Add(r); } else { r.points[0][0] = 10 - positionX; r.points[0][1] = 10 - positionY; r.points[0][2] = -0.1; r.points[1][0] = 7.5 - positionX; r.points[1][1] = 10 - positionY; r.points[1][2] = -0.1; r.points[2][0] = 7.5 - positionX; r.points[2][1] = 9 - positionY; r.points[2][2] = -0.1; r.points[3][0] = 10 - positionX; r.points[3][1] = 9 - positionY; r.points[3][2] = -0.1; p.rectangles.Add(r); } return p; }
public void wallZ(double z1, double z2, double x, double height, string textureName, bool hasColumnsInit, bool hasColumnsEnd) { int tree; Objects.Plane p; Objects.Rectangle r; Engine.Collision collision; Objects.Photo photo; collision = new Engine.Collision(x - 0.5, x + 0.5, z1, z2, 2); collisions.Add(collision); photo = new Objects.Photo(x + 0.1, 3.5, z2 - 5, "workArt" + random.Next(1, 19) + ".png", 4, 3, true); photos.Add(photo); tree = random.Next(1, 4); photo = new Objects.Photo(x + 0.2, 0, z2 - 8, "tree" + tree + ".png", 9, 2, true); photos.Add(photo); photo = new Objects.Photo(x + 0.2, 0, z2 - 3, "tree" + tree + ".png", 9, 2, true); photos.Add(photo); box(x + 4, 0, z2 - 2.1, "box" + random.Next(1, 5) + ".jpg", 3, 2); p = new Objects.Plane(); p.textureName = textureName; for (double i = z1; i < z2; i += quality) { for (double j = 0; j < height; j += quality) { r = new Objects.Rectangle(); r.points[0][0] = x; r.points[0][1] = j; r.points[0][2] = i; r.points[1][0] = x; r.points[1][1] = j; r.points[1][2] = i + quality; r.points[2][0] = x; r.points[2][1] = j + quality; r.points[2][2] = i + quality; r.points[3][0] = x; r.points[3][1] = j + quality; r.points[3][2] = i; p.rectangles.Add(r); } } if (hasColumnsInit) { for (double j = 0; j < height; j += quality) { r = new Objects.Rectangle(); r.points[0][0] = x - 0.2; r.points[0][1] = j; r.points[0][2] = z1; r.points[1][0] = x + 0.2; r.points[1][1] = j; r.points[1][2] = z1; r.points[2][0] = x + 0.2; r.points[2][1] = j + quality; r.points[2][2] = z1; r.points[3][0] = x - 0.2; r.points[3][1] = j + quality; r.points[3][2] = z1; p.rectangles.Add(r); } } if (hasColumnsEnd) { for (double j = 0; j < height; j += quality) { r = new Objects.Rectangle(); r.points[0][0] = x - 0.2; r.points[0][1] = j; r.points[0][2] = z2; r.points[1][0] = x + 0.2; r.points[1][1] = j; r.points[1][2] = z2; r.points[2][0] = x + 0.2; r.points[2][1] = j + quality; r.points[2][2] = z2; r.points[3][0] = x - 0.2; r.points[3][1] = j + quality; r.points[3][2] = z2; p.rectangles.Add(r); } } planes.Add(p); }
public void room(bool isRoof) { double width = 100; double height = 12; Objects.Plane p; Objects.Rectangle r; p = new Objects.Plane(); p.textureName = path + "soil.jpg"; for (double i = 0; i < width; i += quality) { for (double j = 0; j < width; j += quality) { r = new Objects.Rectangle(); r.points[0][0] = j; r.points[0][2] = i; r.points[1][0] = j; r.points[1][2] = i + quality; r.points[2][0] = j + quality; r.points[2][2] = i + quality; r.points[3][0] = j + quality; r.points[3][2] = i; p.rectangles.Add(r); } } planes.Add(p); if (isRoof) { p = new Objects.Plane(); p.textureName = path + "roof.jpg"; for (double i = 0; i < width; i += quality) { for (double j = 0; j < width; j += quality) { r = new Objects.Rectangle(); r.points[0][0] = j; r.points[0][1] = height; r.points[0][2] = i; r.points[1][0] = j; r.points[1][1] = height; r.points[1][2] = i + quality; r.points[2][0] = j + quality; r.points[2][1] = height; r.points[2][2] = i + quality; r.points[3][0] = j + quality; r.points[3][1] = height; r.points[3][2] = i; p.rectangles.Add(r); } } planes.Add(p); } wallX(0, width, 0, height, path + "wall.jpg", false, false); wallX(0, width, width, height, path + "wall.jpg", false, false); wallZ(0, width, 0, height, path + "wall.jpg", false, false); wallZ(0, width, width, height, path + "wall.jpg", false, false); }
public void wallX(double x1, double x2, double z, double height, string textureName, bool hasColumnsInit, bool hasColumnsEnd) { int tree; Objects.Plane p; Objects.Rectangle r; Engine.Collision collision; Objects.Photo photo; collision = new Engine.Collision(x1, x2, z - 0.5, z + 0.5, 1); collisions.Add(collision); photo = new Objects.Photo(x1 + 5, 3.5, z + 0.1, "workArt" + random.Next(1, 19) + ".png", 4, 3, false); photos.Add(photo); tree = random.Next(1, 4); photo = new Objects.Photo(x1 + 8, 0, z + 0.2, "tree" + tree + ".png", 9, 2, false); photos.Add(photo); photo = new Objects.Photo(x1 + 3, 0, z + 0.2, "tree" + tree + ".png", 9, 2, false); photos.Add(photo); box(x1 + 1.1, 0, z + 4, "box" + random.Next(1, 5) + ".jpg", 2, 1); p = new Objects.Plane(); p.textureName = textureName; for (double i = x1; i < x2; i += quality) { for (double j = 0; j < height; j += quality) { r = new Objects.Rectangle(); r.points[0][0] = i; r.points[0][1] = j; r.points[0][2] = z; r.points[1][0] = i + quality; r.points[1][1] = j; r.points[1][2] = z; r.points[2][0] = i + quality; r.points[2][1] = j + quality; r.points[2][2] = z; r.points[3][0] = i; r.points[3][1] = j + quality; r.points[3][2] = z; p.rectangles.Add(r); } } if (hasColumnsInit) { for (double j = 0; j < height; j += quality) { r = new Objects.Rectangle(); r.points[0][0] = x1; r.points[0][1] = j; r.points[0][2] = z - 0.2; r.points[1][0] = x1; r.points[1][1] = j; r.points[1][2] = z + 0.2; r.points[2][0] = x1; r.points[2][1] = j + quality; r.points[2][2] = z + 0.2; r.points[3][0] = x1; r.points[3][1] = j + quality; r.points[3][2] = z - 0.2; p.rectangles.Add(r); } } if (hasColumnsEnd) { for (double j = 0; j < height; j += quality) { r = new Objects.Rectangle(); r.points[0][0] = x2; r.points[0][1] = j; r.points[0][2] = z - 0.2; r.points[1][0] = x2; r.points[1][1] = j; r.points[1][2] = z + 0.2; r.points[2][0] = x2; r.points[2][1] = j + quality; r.points[2][2] = z + 0.2; r.points[3][0] = x2; r.points[3][1] = j + quality; r.points[3][2] = z - 0.2; p.rectangles.Add(r); } } planes.Add(p); }
public void wallZ(double z1, double z2, double x, double height, string textureName, double quality, bool hasColumnsInit, bool hasColumnsEnd) { Objects.Plane p; Objects.Rectangle r; Engine.Collision collision; collision = new Engine.Collision(x - 0.5, x + 0.5, z1, z2, 2); collisions.Add(collision); p = new Objects.Plane(); p.textureName = textureName; for (double i = z1; i < z2; i += quality) { for (double j = 0; j < height; j += quality) { r = new Objects.Rectangle(); r.points[0][0] = x; r.points[0][1] = j; r.points[0][2] = i; r.points[1][0] = x; r.points[1][1] = j; r.points[1][2] = i + quality; r.points[2][0] = x; r.points[2][1] = j + quality; r.points[2][2] = i + quality; r.points[3][0] = x; r.points[3][1] = j + quality; r.points[3][2] = i; p.rectangles.Add(r); } } if (hasColumnsInit) { for (double j = 0; j < height; j += quality) { r = new Objects.Rectangle(); r.points[0][0] = x - 0.2; r.points[0][1] = j; r.points[0][2] = z1; r.points[1][0] = x + 0.2; r.points[1][1] = j; r.points[1][2] = z1; r.points[2][0] = x + 0.2; r.points[2][1] = j + quality; r.points[2][2] = z1; r.points[3][0] = x - 0.2; r.points[3][1] = j + quality; r.points[3][2] = z1; p.rectangles.Add(r); } } if (hasColumnsEnd) { for (double j = 0; j < height; j += quality) { r = new Objects.Rectangle(); r.points[0][0] = x - 0.2; r.points[0][1] = j; r.points[0][2] = z2; r.points[1][0] = x + 0.2; r.points[1][1] = j; r.points[1][2] = z2; r.points[2][0] = x + 0.2; r.points[2][1] = j + quality; r.points[2][2] = z2; r.points[3][0] = x - 0.2; r.points[3][1] = j + quality; r.points[3][2] = z2; p.rectangles.Add(r); } } planes.Add(p); }
public void environment() { double height = 1000; double width = 1000; Objects.Plane p; Objects.Rectangle r; p = new Objects.Plane(); p.textureName = path + "panoramic1.jpg"; r = new Objects.Rectangle(); r.points[0][0] = width; r.points[0][1] = height; r.points[0][2] = -width; r.points[1][0] = -width; r.points[1][1] = height; r.points[1][2] = -width; r.points[2][0] = -width; r.points[2][1] = -0.2; r.points[2][2] = -width; r.points[3][0] = width; r.points[3][1] = -0.2; r.points[3][2] = -width; p.rectangles.Add(r); p.rotate = true; planes.Add(p); p = new Objects.Plane(); p.textureName = path + "panoramic2.jpg"; r = new Objects.Rectangle(); r.points[0][0] = width; r.points[0][1] = height; r.points[0][2] = -width; r.points[1][0] = width; r.points[1][1] = height; r.points[1][2] = width; r.points[2][0] = width; r.points[2][1] = -0.2; r.points[2][2] = width; r.points[3][0] = width; r.points[3][1] = -0.2; r.points[3][2] = -width; p.rectangles.Add(r); planes.Add(p); p = new Objects.Plane(); p.textureName = path + "panoramic3.jpg"; r = new Objects.Rectangle(); r.points[0][0] = -width; r.points[0][1] = height; r.points[0][2] = width; r.points[1][0] = width; r.points[1][1] = height; r.points[1][2] = width; r.points[2][0] = width; r.points[2][1] = -0.2; r.points[2][2] = width; r.points[3][0] = -width; r.points[3][1] = -0.2; r.points[3][2] = width; p.rectangles.Add(r); p.rotate = true; planes.Add(p); p = new Objects.Plane(); p.textureName = path + "panoramic4.jpg"; r = new Objects.Rectangle(); r.points[0][0] = -width; r.points[0][1] = height; r.points[0][2] = width; r.points[1][0] = -width; r.points[1][1] = height; r.points[1][2] = -width; r.points[2][0] = -width; r.points[2][1] = -0.2; r.points[2][2] = -width; r.points[3][0] = -width; r.points[3][1] = -0.2; r.points[3][2] = width; p.rectangles.Add(r); planes.Add(p); p = new Objects.Plane(); p.textureName = path + "panoramic5.jpg"; r = new Objects.Rectangle(); r.points[0][0] = -width; r.points[0][1] = height; r.points[0][2] = width; r.points[1][0] = width; r.points[1][1] = height; r.points[1][2] = width; r.points[2][0] = width; r.points[2][1] = height; r.points[2][2] = -width; r.points[3][0] = -width; r.points[3][1] = height; r.points[3][2] = -width; p.rectangles.Add(r); p.rotate = true; planes.Add(p); p = new Objects.Plane(); p.textureName = path + "panoramic6.jpg"; r = new Objects.Rectangle(); r.points[0][0] = width; r.points[0][1] = -0.2; r.points[0][2] = width; r.points[1][0] = width; r.points[1][1] = -0.2; r.points[1][2] = -width; r.points[2][0] = -width; r.points[2][1] = -0.2; r.points[2][2] = -width; r.points[3][0] = -width; r.points[3][1] = -0.2; r.points[3][2] = width; p.rectangles.Add(r); planes.Add(p); }
public void environment() { double height = 2000; double width = 5000; Objects.Plane p; Objects.Rectangle r; p = new Objects.Plane(); p.textureName = path + "panoramic1.jpg"; r = new Objects.Rectangle(); r.points[0][0] = width; r.points[0][1] = height; r.points[0][2] = -width; r.points[1][0] = -width; r.points[1][1] = height; r.points[1][2] = -width; r.points[2][0] = -width; r.points[2][1] = -1; r.points[2][2] = -width; r.points[3][0] = width; r.points[3][1] = -1; r.points[3][2] = -width; p.rectangles.Add(r); p.rotate = true; planes.Add(p); p = new Objects.Plane(); p.textureName = path + "panoramic2.jpg"; r = new Objects.Rectangle(); r.points[0][0] = width; r.points[0][1] = height; r.points[0][2] = -width; r.points[1][0] = width; r.points[1][1] = height; r.points[1][2] = width; r.points[2][0] = width; r.points[2][1] = -1; r.points[2][2] = width; r.points[3][0] = width; r.points[3][1] = -1; r.points[3][2] = -width; p.rectangles.Add(r); planes.Add(p); p = new Objects.Plane(); p.textureName = path + "panoramic3.jpg"; r = new Objects.Rectangle(); r.points[0][0] = -width; r.points[0][1] = height; r.points[0][2] = width; r.points[1][0] = width; r.points[1][1] = height; r.points[1][2] = width; r.points[2][0] = width; r.points[2][1] = -1; r.points[2][2] = width; r.points[3][0] = -width; r.points[3][1] = -1; r.points[3][2] = width; p.rectangles.Add(r); p.rotate = true; planes.Add(p); p = new Objects.Plane(); p.textureName = path + "panoramic4.jpg"; r = new Objects.Rectangle(); r.points[0][0] = -width; r.points[0][1] = height; r.points[0][2] = width; r.points[1][0] = -width; r.points[1][1] = height; r.points[1][2] = -width; r.points[2][0] = -width; r.points[2][1] = -1; r.points[2][2] = -width; r.points[3][0] = -width; r.points[3][1] = -1; r.points[3][2] = width; p.rectangles.Add(r); planes.Add(p); p = new Objects.Plane(); p.textureName = path + "panoramic5.jpg"; r = new Objects.Rectangle(); r.points[0][0] = -width; r.points[0][1] = height; r.points[0][2] = width; r.points[1][0] = width; r.points[1][1] = height; r.points[1][2] = width; r.points[2][0] = width; r.points[2][1] = height; r.points[2][2] = -width; r.points[3][0] = -width; r.points[3][1] = height; r.points[3][2] = -width; p.rectangles.Add(r); p.rotate = true; planes.Add(p); p = new Objects.Plane(); p.textureName = path + "panoramic6.jpg"; r = new Objects.Rectangle(); r.points[0][0] = width; r.points[0][1] = -1; r.points[0][2] = width; r.points[1][0] = width; r.points[1][1] = -1; r.points[1][2] = -width; r.points[2][0] = -width; r.points[2][1] = -1; r.points[2][2] = -width; r.points[3][0] = -width; r.points[3][1] = -1; r.points[3][2] = width; p.rectangles.Add(r); planes.Add(p); }
public void room(bool isRoof) { double width = 100; double height = 12; double quality = 2; Objects.Plane p; Objects.Rectangle r; p = new Objects.Plane(); p.textureName = path + "soil.jpg"; for (double i = 0; i < width; i += quality) { for (double j = 0; j < width; j += quality) { r = new Objects.Rectangle(); r.points[0][0] = j; r.points[0][2] = i; r.points[1][0] = j; r.points[1][2] = i + quality; r.points[2][0] = j + quality; r.points[2][2] = i + quality; r.points[3][0] = j + quality; r.points[3][2] = i; p.rectangles.Add(r); } } planes.Add(p); if (isRoof) { p = new Objects.Plane(); p.textureName = path + "roof.jpg"; for (double i = 0; i < width; i += quality) { for (double j = 0; j < width; j += quality) { r = new Objects.Rectangle(); r.points[0][0] = j; r.points[0][1] = height; r.points[0][2] = i; r.points[1][0] = j; r.points[1][1] = height; r.points[1][2] = i + quality; r.points[2][0] = j + quality; r.points[2][1] = height; r.points[2][2] = i + quality; r.points[3][0] = j + quality; r.points[3][1] = height; r.points[3][2] = i; p.rectangles.Add(r); } } planes.Add(p); } wallX(0, width, 0, height, path + "wall1.jpg", quality, false, false); wallX(0, width, width, height, path + "wall2.jpg", quality, false, false); wallZ(0, width, 0, height, path + "wall3.jpg", quality, false, false); wallZ(0, width, width, height, path + "wall4.jpg", quality, false, false); }