完善shapeCollision 支持多边形

This commit is contained in:
YHH
2020-06-16 00:04:28 +08:00
parent 5186bc0187
commit dba43b9773
22 changed files with 872 additions and 94 deletions

View File

@@ -212,6 +212,10 @@ class Entity {
return this.components.getComponent(type, false) as T;
}
public getComponents<T extends Component>(type): T[]{
return this.components.getComponents<T>(type);
}
public removeComponentForType<T extends Component>(type){
let comp = this.getComponent<T>(type);
if (comp){