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

@@ -1,9 +1,8 @@
abstract class Shape {
public bounds: Rectangle = new Rectangle();
abstract class Shape extends egret.DisplayObject {
public abstract bounds: Rectangle;
public position: Vector2 = Vector2.zero;
public abstract center: Vector2;
public abstract recalculateBounds(collider: Collider);
public abstract pointCollidesWithShape(point: Vector2): CollisionResult;
public abstract overlaps(other: Shape);
public abstract collidesWithShape(other: Shape): CollisionResult;