新增entitylist用于管理实体

This commit is contained in:
yhh
2020-06-08 20:11:58 +08:00
parent 57efc5b0e6
commit a048a8ac29
15 changed files with 936 additions and 38 deletions

View File

@@ -20,7 +20,7 @@ class Camera extends Component {
}
public update(){
SceneManager.getActiveScene().entities.forEach(entity => entity.components.forEach(component => {
SceneManager.getActiveScene().entities.buffer.forEach(entity => entity.components.forEach(component => {
if (component.displayRender){
let has = this.entity.scene.$children.indexOf(component.displayRender)
if (has == -1){