ecs适配egret

This commit is contained in:
yhh
2020-06-29 15:41:02 +08:00
parent a63d8598d8
commit a4f1ae351f
33 changed files with 647 additions and 871 deletions

View File

@@ -31,13 +31,7 @@ abstract class RenderableComponent extends Component implements IRenderable {
}
public get bounds(): Rectangle{
if (this._areBoundsDirty){
this._bounds.calculateBounds(this.entity.transform.position, this._localOffset, new Vector2(0, 0),
this.entity.transform.scale, this.entity.transform.rotation, this.width, this.height);
this._areBoundsDirty = false;
}
return this._bounds;
return new Rectangle(this.getBounds().x, this.getBounds().y, this.getBounds().width, this.getBounds().height);
}
protected getWidth(){