修复scenecomponent遍历更新报错
This commit is contained in:
2
source/bin/framework.d.ts
vendored
2
source/bin/framework.d.ts
vendored
@@ -362,7 +362,7 @@ declare module es {
|
|||||||
/**
|
/**
|
||||||
* 当Core将这个场景设置为活动场景时,这个将被调用
|
* 当Core将这个场景设置为活动场景时,这个将被调用
|
||||||
*/
|
*/
|
||||||
onStart(): Promise<void>;
|
onStart(): void;
|
||||||
/**
|
/**
|
||||||
* 在场景子类中重写这个,并在这里做任何必要的卸载。
|
* 在场景子类中重写这个,并在这里做任何必要的卸载。
|
||||||
* 当Core把这个场景从活动槽中移除时,这个被调用。
|
* 当Core把这个场景从活动槽中移除时,这个被调用。
|
||||||
|
|||||||
@@ -780,11 +780,6 @@ var es;
|
|||||||
* 当Core将这个场景设置为活动场景时,这个将被调用
|
* 当Core将这个场景设置为活动场景时,这个将被调用
|
||||||
*/
|
*/
|
||||||
Scene.prototype.onStart = function () {
|
Scene.prototype.onStart = function () {
|
||||||
return __awaiter(this, void 0, void 0, function () {
|
|
||||||
return __generator(this, function (_a) {
|
|
||||||
return [2 /*return*/];
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* 在场景子类中重写这个,并在这里做任何必要的卸载。
|
* 在场景子类中重写这个,并在这里做任何必要的卸载。
|
||||||
@@ -822,8 +817,8 @@ var es;
|
|||||||
// 更新我们的列表,以防它们有任何变化
|
// 更新我们的列表,以防它们有任何变化
|
||||||
this.entities.updateLists();
|
this.entities.updateLists();
|
||||||
for (var i = this._sceneComponents.length - 1; i >= 0; i--) {
|
for (var i = this._sceneComponents.length - 1; i >= 0; i--) {
|
||||||
if (this._sceneComponents[i].enabled)
|
if (this._sceneComponents.buffer[i].enabled)
|
||||||
this._sceneComponents[i].update();
|
this._sceneComponents.buffer[i].update();
|
||||||
}
|
}
|
||||||
// 更新我们的实体解析器
|
// 更新我们的实体解析器
|
||||||
if (this.entityProcessors != null)
|
if (this.entityProcessors != null)
|
||||||
|
|||||||
2
source/bin/framework.min.js
vendored
2
source/bin/framework.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -32,7 +32,7 @@ module es {
|
|||||||
/**
|
/**
|
||||||
* 当Core将这个场景设置为活动场景时,这个将被调用
|
* 当Core将这个场景设置为活动场景时,这个将被调用
|
||||||
*/
|
*/
|
||||||
public async onStart() {
|
public onStart() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -87,8 +87,8 @@ module es {
|
|||||||
this.entities.updateLists();
|
this.entities.updateLists();
|
||||||
|
|
||||||
for (let i = this._sceneComponents.length - 1; i >= 0; i--) {
|
for (let i = this._sceneComponents.length - 1; i >= 0; i--) {
|
||||||
if (this._sceneComponents[i].enabled)
|
if (this._sceneComponents.buffer[i].enabled)
|
||||||
this._sceneComponents[i].update();
|
this._sceneComponents.buffer[i].update();
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新我们的实体解析器
|
// 更新我们的实体解析器
|
||||||
|
|||||||
Reference in New Issue
Block a user