完善渐隐场景转换

This commit is contained in:
yhh
2020-06-22 15:27:58 +08:00
parent 3d9730d956
commit 481112cfc2
15 changed files with 247 additions and 277 deletions

View File

@@ -117,6 +117,9 @@ class Scene extends egret.DisplayObjectContainer {
this.removeEventListener(egret.Event.DEACTIVATE, this.onDeactive, this);
this.removeEventListener(egret.Event.ACTIVATE, this.onActive, this);
for (let i = 0; i < this._renderers.length; i ++){
this._renderers[i].unload();
}
this.entities.removeAllEntities();
Physics.clear();
@@ -127,6 +130,8 @@ class Scene extends egret.DisplayObjectContainer {
if (this.entityProcessors)
this.entityProcessors.end();
this.unload();
}
protected onStart(){
@@ -143,6 +148,8 @@ class Scene extends egret.DisplayObjectContainer {
}
protected unload(){ }
public update() {
this.entities.updateLists();