Files
esengine/source/src/Physics/Shapes/Shape.ts

21 lines
819 B
TypeScript
Raw Normal View History

2020-07-22 20:07:14 +08:00
abstract class Shape {
/** 缓存的形状边界 内部字段 */
public bounds: Rectangle;
/**
*
* localOffset
*
*/
public center: Vector2;
/**
* entity.position
* //
*
*/
public position: Vector2;
2020-07-22 20:07:14 +08:00
public abstract recalculateBounds(collider: Collider);
public abstract pointCollidesWithShape(point: Vector2): CollisionResult;
2020-06-16 00:04:28 +08:00
public abstract overlaps(other: Shape);
public abstract collidesWithShape(other: Shape): CollisionResult;
2020-06-11 20:36:36 +08:00
}