59 lines
1.4 KiB
Plaintext
59 lines
1.4 KiB
Plaintext
import { _decorator, Node } from 'cc';
|
|
import { GButton } from '../../Main/Common/GButton';
|
|
import ResManager from '../../Main/Manager/ResManager';
|
|
import AudioManager from '../../Main/Manager/AudioManager';
|
|
import Utils from '../../Main/Common/Utils';
|
|
import { InnerMsgCode } from '../../Main/Config/InnerMsgCode';
|
|
import li_BaseView from '../../Main/Common/li_BaseView';
|
|
import GameRootUI from '../../Main/Common/GameRootUI';
|
|
const { ccclass, property } = _decorator;
|
|
|
|
//游戏关卡界面
|
|
@ccclass('Game_UI')
|
|
export class Game_UI extends li_BaseView {
|
|
private _nodeTab: any = {};
|
|
private _data;
|
|
|
|
//----重写父类接口---------------------------------------
|
|
onLoadCT() {
|
|
this.registerListenner();
|
|
}
|
|
openUIDataCT(data: any): void {
|
|
this._data = data
|
|
}
|
|
|
|
|
|
registerListenner() {
|
|
Utils.addInnerEL(InnerMsgCode.GM_UI_Close, this, this.resiveGMClose)
|
|
}
|
|
|
|
|
|
start() {
|
|
Utils.parseNode(this.node, this._nodeTab)
|
|
|
|
GButton.BandClick(this._nodeTab.btnBack, this.onBackClick, this);
|
|
|
|
AudioManager.I.PlayMusic(1, true) //背景乐
|
|
|
|
}
|
|
|
|
update(deltaTime: number) {
|
|
|
|
}
|
|
|
|
|
|
//GM界面关闭消息
|
|
resiveGMClose(data) {
|
|
Utils.Log("收到GM界面关闭消息")
|
|
}
|
|
|
|
|
|
//返回按钮
|
|
onBackClick() {
|
|
Utils.Log("点击星级挑战");
|
|
GameRootUI.ShowCrossUI()
|
|
ResManager.I.goMainScene(); //进入下一个场景
|
|
}
|
|
|
|
}
|