pubgv3/assets/scripts/tips/BoostTips.ts
2022-06-07 10:49:46 +08:00

36 lines
711 B
TypeScript

import NetManage from '../manages/NetManage';
import { UIBase } from '../UI/UIBase';
const { ccclass, property } = cc._decorator;
@ccclass
export class BoostTips extends UIBase {
public static prefabPath = 'prefabs/tips/pb_Boost';
@property(cc.Label) cegLabel: cc.Label = null;
private indata: any;
init(data: any) {
// {
// cegNum
// missionid
// }
this.indata = data;
this.cegLabel.string = `x${data.cegNum}`;
}
onClose() {
this.node.destroy();
}
onOK() {
this.node.destroy();
cc.Notifier.emit('boostsuccess');
// NetManage.boostOfferRewardMission(this.indata.missionId, () => {
// this.node.destroy();
// cc.uiHelper.showTips('Boost Success!');
// });
}
}