collider更改

This commit is contained in:
yhh
2020-07-20 16:38:49 +08:00
parent 2a38858838
commit 6b8569b0b5
13 changed files with 110 additions and 196 deletions

View File

@@ -137,6 +137,18 @@ class Rectangle extends egret.Rectangle {
return boundsPoint;
}
/**
* 将egret矩形转化为Rectangle
* @param rect
*/
public setEgretRect(rect: egret.Rectangle): Rectangle{
this.x = rect.x;
this.y = rect.y;
this.width = rect.width;
this.height = rect.height;
return this;
}
/**
* 给定多边形的点,计算边界