update 页面跳转

This commit is contained in:
2025-09-21 16:04:51 +08:00
parent 69318c3404
commit d1f88f15c1
14 changed files with 60 additions and 30 deletions
+13 -3
View File
@@ -69,12 +69,20 @@ export class PreloadUI extends Component {
//Utils.addInnerEL(InnerMsgCode.UI_ShowPrompt, this, this.resiveShowPrompt)
Utils.parseNode(this.node, this._nodeTab);
// 添加新的事件监听
this.appVersion = this._nodeTab.appVersion.getComponent(Label);
this.loginBtn = this._nodeTab.btnLogin;
this.loginBtn.active = false;
this.appVersion.string = `app version: ${prodConfig.appVersion}`;
this.VideoPlayer = this._nodeTab.VideoPlayer.getComponent(VideoPlayer);
this.VideoPlayer.node.on(
VideoPlayer.EventType.META_LOADED,
this.onVideoReadyToPlay,
this
);
GButton.BandClick(this.loginBtn, this.onLogin, this);
this.jinduBar = this.node.getChildByName("jinduBar");
@@ -105,10 +113,12 @@ export class PreloadUI extends Component {
this.preloadFiles();
}
protected onDestroy(): void {
}
protected onDestroy(): void {}
onVideoReadyToPlay() {
console.log("Video Ready");
this._nodeTab.VideoPlayer.getComponent(VideoPlayer).play();
}
update(deltaTime: number) {
if (!this.preloadFinish) {
return;