pubgv3/assets/scripts/tips/UpSuccess.ts
guoqing.zhu 9fdc962809 update
2022-06-14 11:32:52 +08:00

33 lines
984 B
TypeScript

import { UIBase } from '../UI/UIBase';
const { ccclass, property } = cc._decorator;
@ccclass
export class UpSuccess extends UIBase {
public static prefabPath = 'prefabs/UIPrefab/pb_herosuccess';
@property(cc.Node) beforeNode: cc.Node = null;
@property(cc.Label) lb_lv: cc.Label = null;
@property(cc.Label) lb_hp: cc.Label = null;
@property(cc.Label) lb_atk: cc.Label = null;
@property(cc.Label) lb_def: cc.Label = null;
@property(cc.Label) lb_lucky: cc.Label = null;
@property(cc.Label) lb_adv: cc.Label = null;
@property(cc.Label) lb_hpaf: cc.Label = null;
@property(cc.Label) lb_atkaf: cc.Label = null;
@property(cc.Label) lb_defaf: cc.Label = null;
@property(cc.Label) lb_luckyaf: cc.Label = null;
@property(cc.Label) lb_advaf: cc.Label = null;
init(data: any) {
console.log(JSON.stringify(data));
this.beforeNode.getComponent('herochoseone').initdata(data.old_hero);
this.lb_lv.string = data.new_hero.hero_lv;
}
onClose() {
this.node.destroy();
}
}