async scenetransition
This commit is contained in:
@@ -12,7 +12,7 @@ class FadeTransition extends SceneTransition {
|
|||||||
this._mask = new egret.Shape();
|
this._mask = new egret.Shape();
|
||||||
}
|
}
|
||||||
|
|
||||||
public onBeginTransition() {
|
public async onBeginTransition() {
|
||||||
this._mask.graphics.beginFill(this.fadeToColor, 1);
|
this._mask.graphics.beginFill(this.fadeToColor, 1);
|
||||||
this._mask.graphics.drawRect(0, 0, SceneManager.stage.stageWidth, SceneManager.stage.stageHeight);
|
this._mask.graphics.drawRect(0, 0, SceneManager.stage.stageWidth, SceneManager.stage.stageHeight);
|
||||||
this._mask.graphics.endFill();
|
this._mask.graphics.endFill();
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ abstract class SceneTransition {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public onBeginTransition() {
|
public async onBeginTransition() {
|
||||||
this.loadNextScene();
|
await this.loadNextScene();
|
||||||
this.transitionComplete();
|
this.transitionComplete();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -56,11 +56,10 @@ class WindTransition extends SceneTransition {
|
|||||||
SceneManager.stage.addChild(this._mask);
|
SceneManager.stage.addChild(this._mask);
|
||||||
}
|
}
|
||||||
|
|
||||||
public onBeginTransition() {
|
public async onBeginTransition() {
|
||||||
this.loadNextScene();
|
this.loadNextScene();
|
||||||
this.tickEffectProgressProperty(this._windEffect, this.duration, this.easeType).then(()=>{
|
await this.tickEffectProgressProperty(this._windEffect, this.duration, this.easeType);
|
||||||
this.transitionComplete();
|
this.transitionComplete();
|
||||||
SceneManager.stage.removeChild(this._mask);
|
SceneManager.stage.removeChild(this._mask);
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user