demo 更新

This commit is contained in:
yhh
2020-08-21 19:21:40 +08:00
parent 6d4d787530
commit 646d1806ec
144 changed files with 51196 additions and 2531 deletions

View File

@@ -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;
}

View File

@@ -316,6 +316,13 @@ module es {
this.components.update();
}
/**
* 在默认渲染器中如果Core.debugRenderEnabled为true则调用。自定义渲染器可以选择是否调用它。
*/
public debugRender(){
this.components.debugRender();
}
/**
* 将组件添加到组件列表中。返回组件。
* @param component

View File

@@ -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();
}
}
}
}