2020-06-11 20:36:36 +08:00
|
|
|
abstract class Shape {
|
2020-07-09 14:16:10 +08:00
|
|
|
public bounds: Rectangle = new Rectangle();
|
|
|
|
|
public position: Vector2 = Vector2.zero;
|
|
|
|
|
public abstract center: Vector2;
|
2020-06-12 20:24:51 +08:00
|
|
|
|
2020-06-15 20:08:21 +08:00
|
|
|
public abstract recalculateBounds(collider: Collider);
|
2020-06-12 20:24:51 +08:00
|
|
|
public abstract pointCollidesWithShape(point: Vector2): CollisionResult;
|
2020-06-16 00:04:28 +08:00
|
|
|
public abstract overlaps(other: Shape);
|
2020-06-16 11:22:37 +08:00
|
|
|
public abstract collidesWithShape(other: Shape): CollisionResult;
|
2020-06-11 20:36:36 +08:00
|
|
|
}
|