update 页面跳转
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user