Example #1
0
 public static RectInt MoveDown(this RectInt rect, int distance = -1)
 {
     if (distance == -1)
     {
         distance = rect.height;
     }
     return(rect.Move(0, -distance));
 }
Example #2
0
 public static RectInt MoveLeft(this RectInt rect, int distance = -1)
 {
     if (distance == -1)
     {
         distance = rect.width;
     }
     return(rect.Move(-distance, 0));
 }
Example #3
0
 public static RectInt Move(this RectInt rect, Vector2Int offset)
 {
     return(rect.Move(offset.x, offset.y));
 }