修复componentlist中渲染组件add错误

This commit is contained in:
yhh
2021-08-13 19:27:15 +08:00
parent 3486d403d2
commit 6adea240e2
3 changed files with 3 additions and 3 deletions

View File

@@ -4507,7 +4507,7 @@ var es;
for (var i = 0, s = this._components.length; i < s; ++i) {
var component = this._components[i];
if (component instanceof es.RenderableComponent)
this._entity.scene.renderableComponents.remove(component);
this._entity.scene.renderableComponents.add(component);
if (es.isIUpdatable(component))
this._updatableComponents.push(component);
this.addBits(component);

File diff suppressed because one or more lines are too long

View File

@@ -113,7 +113,7 @@ module es {
for (let i = 0, s = this._components.length; i < s; ++ i) {
let component = this._components[i];
if (component instanceof RenderableComponent)
this._entity.scene.renderableComponents.remove(component);
this._entity.scene.renderableComponents.add(component);
if (isIUpdatable(component))
this._updatableComponents.push(component);