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