新增renderablecomponent显示

优化返回值
This commit is contained in:
yhh
2020-07-27 16:10:36 +08:00
parent 149a3e5833
commit 506f8ddc0f
28 changed files with 631 additions and 512 deletions

View File

@@ -66,15 +66,15 @@ module es {
return super.overlaps(other);
}
public collidesWithShape(other: Shape){
public collidesWithShape(other: Shape, result: CollisionResult): boolean{
// 特殊情况这一个高性能方式实现其他情况则使用polygon方法检测
if (other instanceof Box && (other as Box).isUnrotated){
return ShapeCollisions.boxToBox(this, other);
return ShapeCollisions.boxToBox(this, other, result);
}
// TODO: 让 minkowski 运行于 cricleToBox
return super.collidesWithShape(other);
return super.collidesWithShape(other, result);
}
public containsPoint(point: Vector2){