demo 更新
This commit is contained in:
@@ -116,6 +116,9 @@ module es {
|
||||
* @param camera
|
||||
*/
|
||||
public isVisibleFromCamera(camera: Camera): boolean {
|
||||
if (!camera)
|
||||
return false;
|
||||
|
||||
this.isVisible = camera.bounds.intersects(this.displayObject.getBounds().union(this.bounds));
|
||||
return this.isVisible;
|
||||
}
|
||||
|
||||
@@ -316,6 +316,13 @@ module es {
|
||||
this.components.update();
|
||||
}
|
||||
|
||||
/**
|
||||
* 在默认渲染器中,如果Core.debugRenderEnabled为true,则调用。自定义渲染器可以选择是否调用它。
|
||||
*/
|
||||
public debugRender(){
|
||||
this.components.debugRender();
|
||||
}
|
||||
|
||||
/**
|
||||
* 将组件添加到组件列表中。返回组件。
|
||||
* @param component
|
||||
|
||||
@@ -267,5 +267,12 @@ module es {
|
||||
for (let i = 0; i < this._components.length; i++)
|
||||
this._components[i].onDisabled();
|
||||
}
|
||||
|
||||
public debugRender(){
|
||||
for (let i = 0; i < this._components.length; i ++){
|
||||
if (this._components[i].enabled)
|
||||
this._components[i].debugRender();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user