新增shapecollision 用于计算多边形碰撞

This commit is contained in:
yhh
2020-06-12 20:24:51 +08:00
parent da5a1a0c79
commit 246e9a9511
18 changed files with 714 additions and 22 deletions

View File

@@ -1,6 +1,7 @@
abstract class Collider extends Component{
public shape: Shape;
public physicsLayer = 1 << 0;
public isTrigger: boolean;
public get bounds(): Rectangle {
return this.shape.bounds;