[engine] remove tank grid align
This commit is contained in:
@@ -62,7 +62,7 @@ class Rectangle {
|
||||
}
|
||||
|
||||
public function contain(point:Point):Bool {
|
||||
return point.x >= x && point.y >= y && point.x <= width && point.y <= height;
|
||||
return point.x >= left && point.y >= top && point.x <= right && point.y <= bottom;
|
||||
}
|
||||
|
||||
public function intersection(rect:Rectangle):Bool {
|
||||
@@ -72,6 +72,10 @@ class Rectangle {
|
||||
rect.bottom < top);
|
||||
}
|
||||
|
||||
public function intersection2(line:Line):Bool {
|
||||
return contain(line.point1) || contain(line.point2);
|
||||
}
|
||||
|
||||
public function lean(rect:Rectangle):Void {
|
||||
var side = rect.getSide(direction);
|
||||
if (direction.x != 0) {
|
||||
|
||||
Reference in New Issue
Block a user