新增renderer渲染器 用于控制场景如何渲染

This commit is contained in:
yhh
2020-06-18 16:35:51 +08:00
parent 915056203d
commit feaac83ee7
15 changed files with 459 additions and 25 deletions

View File

@@ -31,6 +31,20 @@ class SpriteRenderer extends RenderableComponent {
return this;
}
public get origin(){
return this._origin;
}
public set origin(value: Vector2){
this.setOrigin(value);
}
public setOrigin(origin: Vector2){
if (this._origin != origin){
this._origin = origin;
this._areBoundsDirty = true;
}
return this;
}
public render(camera: Camera) {
if (!this.sprite)
return;