新增arcadeRigidbody组件, 可以用于简单的,街机风格的物理学
This commit is contained in:
@@ -246,6 +246,17 @@ module es {
|
||||
return new Vector2(Math.round(this.x), Math.round(this.y));
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回以自己为中心点的左右角,单位为度
|
||||
* @param left
|
||||
* @param right
|
||||
*/
|
||||
public angleBetween(left: Vector2, right: Vector2) {
|
||||
let one = Vector2.subtract(left, this);
|
||||
let two = Vector2.subtract(right, this);
|
||||
return Vector2Ext.angle(one, two);
|
||||
}
|
||||
|
||||
/**
|
||||
* 比较当前实例是否等于指定的对象
|
||||
* @param other 要比较的对象
|
||||
|
||||
Reference in New Issue
Block a user