修复因fastlist component丢失问题

This commit is contained in:
yhh
2020-10-30 20:08:26 +08:00
parent c9fc9ffea5
commit 8191359953
9 changed files with 59 additions and 14 deletions
+5 -4
View File
@@ -1513,7 +1513,6 @@ var es;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
this.startDebugUpdate();
es.Time.update(egret.getTimer());
es.Input.update();
if (!this._scene) return [3, 2];
@@ -1537,9 +1536,7 @@ var es;
_a.sent();
this.addChild(this._scene);
_a.label = 2;
case 2:
this.endDebugUpdate();
return [4, this.draw()];
case 2: return [4, this.draw()];
case 3:
_a.sent();
return [2];
@@ -4932,6 +4929,8 @@ var es;
ComponentList.prototype.deregisterAllComponents = function () {
for (var i = 0; i < this._components.length; i++) {
var component = this._components.buffer[i];
if (!component)
continue;
if (component instanceof es.RenderableComponent) {
if (component.displayObject.parent)
component.displayObject.parent.removeChild(component.displayObject);
@@ -5001,6 +5000,8 @@ var es;
}
};
ComponentList.prototype.handleRemove = function (component) {
if (!component)
return;
if (component instanceof es.RenderableComponent) {
if (component.displayObject.parent)
component.displayObject.parent.removeChild(component.displayObject);
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -232,7 +232,7 @@ module es {
}
protected async update() {
this.startDebugUpdate();
// this.startDebugUpdate();
// 更新我们所有的系统管理器
Time.update(egret.getTimer());
@@ -266,7 +266,7 @@ module es {
}
}
this.endDebugUpdate();
// this.endDebugUpdate();
await this.draw();
}
+2
View File
@@ -75,6 +75,7 @@ module es {
for (let i = 0; i < this._components.length; i++) {
let component = this._components.buffer[i];
if (!component) continue;
// 处理渲染层列表
if (component instanceof RenderableComponent) {
if (component.displayObject.parent)
@@ -161,6 +162,7 @@ module es {
}
public handleRemove(component: Component) {
if (!component) return;
// 处理渲染层列表
if (component instanceof RenderableComponent) {
if (component.displayObject.parent)