新增renderer渲染器 用于控制场景如何渲染
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* 所有可渲染组件的基类
|
||||
*/
|
||||
abstract class RenderableComponent extends Component {
|
||||
abstract class RenderableComponent extends Component implements IRenderable {
|
||||
private _isVisible: boolean;
|
||||
protected _areBoundsDirty = true;
|
||||
protected _bounds: Rectangle;
|
||||
@@ -60,4 +60,8 @@ abstract class RenderableComponent extends Component {
|
||||
this.isVisible = camera.bounds.intersects(this.bounds);
|
||||
return this.isVisible;
|
||||
}
|
||||
|
||||
public onEntityTransformChanged(comp: ComponentTransform){
|
||||
this._areBoundsDirty = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user