完善渐隐场景转换
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user