浏览代码

added set

ncannasse 11 年之前
父节点
当前提交
23026fc471
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      h2d/col/Bounds.hx

+ 7 - 0
h2d/col/Bounds.hx

@@ -40,6 +40,13 @@ class Bounds {
 		if( p.y > yMax ) yMax = p.y;
 	}
 
+	public inline function set(x, y, width, height) {
+		this.x = x;
+		this.y = y;
+		this.xMax = x + width;
+		this.yMax = y + height;
+	}
+
 	public inline function setMin( p : Point ) {
 		xMin = p.x;
 		yMin = p.y;