init
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
import { _decorator, Node, Sprite } from 'cc';
|
||||
import { GButton } from '../../Main/Common/GButton';
|
||||
import Utils from '../../Main/Common/Utils';
|
||||
import { InnerMsgCode } from '../../Main/Config/InnerMsgCode';
|
||||
import li_BaseView from '../../Main/Common/li_BaseView';
|
||||
import GameManager from '../../Main/Manager/GameManager';
|
||||
import ResManager from '../../Main/Manager/ResManager';
|
||||
const { ccclass, property } = _decorator;
|
||||
|
||||
//关卡内看广告弹窗界面
|
||||
@ccclass('TalkAdDialog')
|
||||
export class TalkAdDialog extends li_BaseView {
|
||||
|
||||
private _nodeTab: any = {};
|
||||
private _data;
|
||||
|
||||
//----重写父类接口---------------------------------------
|
||||
onLoadCT() {
|
||||
this.registerListenner();
|
||||
Utils.parseNode(this.node, this._nodeTab)
|
||||
|
||||
}
|
||||
openUIDataCT(data: any): void {
|
||||
this._data = data || {};
|
||||
}
|
||||
|
||||
|
||||
registerListenner() {
|
||||
// Utils.addInnerEL(InnerMsgCode.GM_UI_Close, this, this.resiveGMClose)
|
||||
}
|
||||
|
||||
|
||||
start() {
|
||||
GButton.BandClick(this._nodeTab.mask, ()=>{
|
||||
this.doClose();
|
||||
}, this, 0, null, null, false);
|
||||
|
||||
GButton.BandClick(this._nodeTab.btnShare, ()=>{
|
||||
if (this._data.shareCallback) {
|
||||
this._data.shareCallback();
|
||||
}
|
||||
this.doClose();
|
||||
}, this);
|
||||
|
||||
GButton.BandClick(this._nodeTab.btnAD, ()=>{
|
||||
if (this._data.adCallback) {
|
||||
this._data.adCallback();
|
||||
}
|
||||
this.doClose();
|
||||
}, this);
|
||||
|
||||
}
|
||||
|
||||
update(deltaTime: number) {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user