Example #1
0
        // Copy Constructor
        Rect4(Rect4 r)
        {
            point = new Vector2[4];
            point[0].X = r.point[0].X;
            point[0].Y = r.point[0].Y;

            point[1].X = r.point[1].X;
            point[1].Y = r.point[1].Y;

            point[2].X = r.point[2].X;
            point[2].Y = r.point[2].Y;

            point[3].X = r.point[3].X;
            point[3].Y = r.point[3].Y;
        }
Example #2
0
 public static void drawRect4(SpriteBatch sb, Rect4 r, Color c)
 {
     drawLine(sb, c, new Vector2(r.point[0].X, r.point[0].Y), new Vector2(r.point[1].X, r.point[1].Y), 0);
     drawLine(sb, c, new Vector2(r.point[1].X, r.point[1].Y), new Vector2(r.point[2].X, r.point[2].Y), 0);
     drawLine(sb, c, new Vector2(r.point[2].X, r.point[2].Y), new Vector2(r.point[3].X, r.point[3].Y), 0);
     drawLine(sb, c, new Vector2(r.point[3].X, r.point[3].Y), new Vector2(r.point[0].X, r.point[0].Y), 0);
 }