public void InitializeWalls()
        {
            Vector2 RoomCenter = new Vector2(roomMin.X + 100f/2f, roomMin.Y + ((9f/16f)*100f - 4.5f)/2f);

            // left wall
            RoomWalls[0] = new XNACS1Rectangle(new Vector2(roomMin.X + 1.25f, RoomCenter.Y), 2.5f, roomMax.Y - roomMin.Y - 4.5f);
            allWalls.AddToSet(RoomWalls[0]);
            RoomWalls[0].Texture = "leftWall";
            // top wall
            RoomWalls[1] = new XNACS1Rectangle(new Vector2(RoomCenter.X, roomMax.Y - 4.25f - 1.25f), roomMax.X -roomMin.X, 2.5f);
            allWalls.AddToSet(RoomWalls[1]);
            RoomWalls[1].Texture = "topWall";
            // right wall
            RoomWalls[2] = new XNACS1Rectangle(new Vector2(roomMax.X - 1.25f, RoomCenter.Y), 2.5f, roomMax.Y - roomMin.Y - 4.5f);
            allWalls.AddToSet(RoomWalls[2]);
            RoomWalls[2].Texture = "leftWall";
            // bottom wall
            RoomWalls[3] = new XNACS1Rectangle(new Vector2(RoomCenter.X, roomMin.Y + 1.25f), roomMax.X - roomMin.X, 2.5f);
            allWalls.AddToSet(RoomWalls[3]);
            RoomWalls[3].Texture = "topWall";
            DisplayWall = new XNACS1Rectangle(new Vector2(RoomCenter.X, roomMax.Y - 1.9f), roomMax.X-roomMin.X, 4.5f);
            DisplayWall.TopOfAutoDrawSet();
            DisplayWall.Color = Color.Black;
            allWalls.AddToSet(DisplayWall);
        }
Beispiel #2
0
        public void InitializeWalls()
        {
            Vector2 RoomCenter = new Vector2(roomMin.X + 100f/2f, roomMin.Y + ((9f/16f)*100f - 4.5f)/2f);
            // left wall
            // left wall
            RoomWalls[0] = new XNACS1Rectangle(new Vector2(roomMin.X + 1.25f, RoomCenter.Y), 2.5f, roomMax.Y - roomMin.Y - 9f);
            allWalls.AddToSet(RoomWalls[0]);
            RoomWalls[0].Texture = "left_gray_wall";
            // top wall
            RoomWalls[1] = new XNACS1Rectangle(new Vector2(RoomCenter.X, roomMax.Y - 4.25f - 1.25f), roomMax.X - roomMin.X, 2.5f);
            allWalls.AddToSet(RoomWalls[1]);
            RoomWalls[1].Texture = "long_gray_wall_top";
            // right wall
            RoomWalls[2] = new XNACS1Rectangle(new Vector2(roomMax.X - 1.5f, RoomCenter.Y), 2.5f, roomMax.Y - roomMin.Y - 9f);
            allWalls.AddToSet(RoomWalls[2]);
            RoomWalls[2].Texture = "right_gray_wall";
            // bottom wall
            RoomWalls[3] = new XNACS1Rectangle(new Vector2(RoomCenter.X, roomMin.Y + 1.25f), roomMax.X - roomMin.X, 2.5f);
            allWalls.AddToSet(RoomWalls[3]);
            RoomWalls[3].Texture = "long_gray_wall_bottom";

            DisplayWall = new XNACS1Rectangle(new Vector2(RoomCenter.X, roomMax.Y - 1.9f), roomMax.X-roomMin.X, 4.5f);
            DisplayWall.TopOfAutoDrawSet();
            DisplayWall.Color = Color.Black;
            allWalls.AddToSet(DisplayWall);
            left = new XNACS1Rectangle(new Vector2(roomMin.X + 15f, roomMax.Y - 2f), 30f, 4f);
            left.Color = Color.Black;

            allWalls.AddToSet(left);
            ctr = new XNACS1Rectangle(new Vector2(roomMin.X + 45f, roomMax.Y - 2f), 30f, 4f);
            ctr.Color = Color.Black;

            allWalls.AddToSet(ctr);
            right = new XNACS1Rectangle(new Vector2(roomMin.X + 85f, roomMax.Y - 2f), 30f, 4f);
            right.Color = Color.Black;

            allWalls.AddToSet(right);
        }