|
|
@ -40,7 +40,7 @@ export default class InitScene extends BaseScene { |
|
|
super("init", SceneType.Normal); |
|
|
super("init", SceneType.Normal); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async loadBundle(): Promise<void> { |
|
|
protected async onSceneLoadBundle(): Promise<void> { |
|
|
this.loadingBtn = new Button({ |
|
|
this.loadingBtn = new Button({ |
|
|
text: "加载中…", |
|
|
text: "加载中…", |
|
|
position: () => position.get("center", "center"), |
|
|
position: () => position.get("center", "center"), |
|
|
@ -66,11 +66,11 @@ export default class InitScene extends BaseScene { |
|
|
this.loadingBtn = undefined; |
|
|
this.loadingBtn = undefined; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async unLoadBundle(): Promise<void> { |
|
|
protected async onSceneUnloadBundle(): Promise<void> { |
|
|
await assetManager.unloadBundle("load-screen"); |
|
|
await assetManager.unloadBundle("load-screen"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
async layout(): Promise<void> { |
|
|
protected async onSceneLayout(): Promise<void> { |
|
|
this.stage.sortableChildren = true; |
|
|
this.stage.sortableChildren = true; |
|
|
this.stage.eventMode = "passive"; |
|
|
this.stage.eventMode = "passive"; |
|
|
|
|
|
|
|
|
@ -149,7 +149,7 @@ export default class InitScene extends BaseScene { |
|
|
x: 0, |
|
|
x: 0, |
|
|
}), |
|
|
}), |
|
|
onClick: () => { |
|
|
onClick: () => { |
|
|
this.changeScene("welcome", { isHolderLast: false }); |
|
|
this.changeScene("welcome", initSceneLayout.nextSceneTransition); |
|
|
}, |
|
|
}, |
|
|
}); |
|
|
}); |
|
|
this.startBtn._comp.zIndex = Z_TEXT; |
|
|
this.startBtn._comp.zIndex = Z_TEXT; |
|
|
@ -158,12 +158,12 @@ export default class InitScene extends BaseScene { |
|
|
this.placeHeroElements(); |
|
|
this.placeHeroElements(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
onLoad(): void { |
|
|
protected onSceneEnter(): void { |
|
|
window.addEventListener("resize", this.onResize); |
|
|
window.addEventListener("resize", this.onResize); |
|
|
this.pixie?.gotoAndPlay(0); |
|
|
this.pixie?.gotoAndPlay(0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
onUnLoad(): void { |
|
|
protected onSceneExit(): void { |
|
|
window.removeEventListener("resize", this.onResize); |
|
|
window.removeEventListener("resize", this.onResize); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|