Esempio n. 1
0
 public static Generator CutCorners(AsciiTexture texture) => (Scene scene, Zone zone, Vector3 roomCenter) =>
 {
     List <Vector2[]> walls = new List <Vector2[]>
     {
         new Vector2[] { new Vector2(10f, 50f), new Vector2(50f, 10f) },
         new Vector2[] { new Vector2(-50f, 10f), new Vector2(-10f, 50f) },
         new Vector2[] { new Vector2(-10f, -50f), new Vector2(-50f, -10f) },
         new Vector2[] { new Vector2(50f, -10f), new Vector2(10f, -50f) }
     };
     SceneGenUtils.AddWalls(scene, zone, walls, 4f, ObstacleLayer.Wall, texture, roomCenter);
 };
Esempio n. 2
0
 public static Generator PitPillar(AsciiTexture texture) => (Scene scene, Zone zone, Vector3 roomCenter) =>
 {
     Vector2[] pillar = new Vector2[]
     {
         new Vector2(-5f, -5f),
         new Vector2(5f, -5f),
         new Vector2(5f, 5f),
         new Vector2(-5f, 5f),
         new Vector2(-5f, -5f)
     };
     SceneGenUtils.AddWalls(scene, zone, new List <Vector2[]> {
         pillar
     }, -20f, 4f, ObstacleLayer.Wall, texture, roomCenter);
 };
Esempio n. 3
0
 public static Generator PillarBig(AsciiTexture texture) => (Scene scene, Zone zone, Vector3 roomCenter) =>
 {
     Vector2[] points = new Vector2[]
     {
         new Vector2(-4f, -10f),
         new Vector2(4f, -10f),
         new Vector2(10f, -4f),
         new Vector2(10f, 4f),
         new Vector2(4f, 10f),
         new Vector2(-4f, 10f),
         new Vector2(-10f, 4f),
         new Vector2(-10f, -4f),
         new Vector2(-4f, -10f)
     };
     SceneGenUtils.AddWalls(scene, zone, new List <Vector2[]> {
         points
     }, 4f, ObstacleLayer.Wall, texture, roomCenter);
 };
Esempio n. 4
0
        public static Generator Arena(AsciiTexture texture) => (Scene scene, Zone zone, Vector3 roomCenter) =>
        {
            Vector2[] points = new Vector2[]
            {
                new Vector2(27.5f, -15f),
                new Vector2(32.5f, -15f),
                new Vector2(32.5f, 15f),
                new Vector2(27.5f, 15f),
                new Vector2(27.5f, -15f)
            };

            for (int i = 0; i < 4; i++)
            {
                SceneGenUtils.AddWalls(scene, zone, new List <Vector2[]> {
                    points
                }, 4f, ObstacleLayer.Wall, texture, roomCenter);
                for (int j = 0; j < points.Length; j++)
                {
                    points[j] = new Vector2(-points[j].Y, points[j].X);
                }
            }
        };
Esempio n. 5
0
 public static Generator PillarSmall(AsciiTexture texture, Vector2 center, Vector2 size) => (Scene scene, Zone zone, Vector3 roomCenter) =>
 {
     List <Vector2[]> walls  = SceneGenUtils.MakeRect(-size.X / 2f, size.X / 2f, -size.Y / 2f, size.Y / 2f);
     Vector3          offset = roomCenter + new Vector3(center.X, 0f, center.Y);
     SceneGenUtils.AddWalls(scene, zone, walls, 4f, ObstacleLayer.Wall, texture, offset);
 };