移除物理引擎 移动到新库

This commit is contained in:
yhh
2020-06-15 10:42:06 +08:00
parent 7f8f1cf0d0
commit 16892eb7af
21 changed files with 553 additions and 1118 deletions

View File

@@ -14,8 +14,8 @@ class Circle extends Shape {
}
public collidesWithShape(other: Shape): CollisionResult{
if (other instanceof Rect && (other as Rect).isUnrotated){
return ShapeCollisions.circleToRect(this, other as Rect);
if (other instanceof Box && (other as Box).isUnrotated){
return ShapeCollisions.circleToRect(this, other as Box);
}
throw new Error(`Collisions of Circle to ${other} are not supported`);