76 lines
1.9 KiB
JavaScript
76 lines
1.9 KiB
JavaScript
|
|
const ItemBase = require( "nx.fx.sv.expand.item" );
|
||
|
|
const TAG_TXT = ["HallowLv","HallowSkill","HallowRefine"];
|
||
|
|
|
||
|
|
cc.Class({
|
||
|
|
extends: ItemBase,
|
||
|
|
|
||
|
|
properties: {
|
||
|
|
info:{
|
||
|
|
default:null,
|
||
|
|
type:cc.Node
|
||
|
|
},
|
||
|
|
detail:{
|
||
|
|
default:null,
|
||
|
|
type:cc.Node
|
||
|
|
},
|
||
|
|
info_name:{
|
||
|
|
default:null,
|
||
|
|
type:cc.Label
|
||
|
|
},
|
||
|
|
info_lv:{
|
||
|
|
default:null,
|
||
|
|
type:cc.RichText
|
||
|
|
},
|
||
|
|
detail_name:{
|
||
|
|
default:null,
|
||
|
|
type:cc.Label
|
||
|
|
},
|
||
|
|
detail_desc:{
|
||
|
|
default:null,
|
||
|
|
type:cc.Label
|
||
|
|
}
|
||
|
|
},
|
||
|
|
|
||
|
|
// LIFE-CYCLE CALLBACKS:
|
||
|
|
|
||
|
|
// onLoad () {},
|
||
|
|
|
||
|
|
start () {
|
||
|
|
|
||
|
|
},
|
||
|
|
|
||
|
|
setData(data,index,tag){
|
||
|
|
|
||
|
|
// if(nx.dt.objEmpty(data)){
|
||
|
|
// return false;
|
||
|
|
// }
|
||
|
|
|
||
|
|
if(tag == "hallows_1"){
|
||
|
|
this.info.active = true;
|
||
|
|
this.detail.active = false;
|
||
|
|
|
||
|
|
this.info_name.string = nx.text.getKey(TAG_TXT[this.sort_index || 0]);
|
||
|
|
let str = 0;
|
||
|
|
// if(data.vo){
|
||
|
|
// if(index == 0){
|
||
|
|
// str = data.vo.step;
|
||
|
|
// }else if(index == 1){
|
||
|
|
// str = data.vo.skill_lev;
|
||
|
|
// }else{
|
||
|
|
// str = data.vo.refine_lev;
|
||
|
|
// }
|
||
|
|
// }
|
||
|
|
|
||
|
|
let info_str = cc.js.formatStr("<color=#27ae10>%s</color>/%s",data,game.configs.hallows_data.data_const.lv_max.val[this.sort_index || 0]);
|
||
|
|
this.info_lv.string = info_str;
|
||
|
|
}else{
|
||
|
|
this.info.active = false;
|
||
|
|
this.detail.active = true;
|
||
|
|
|
||
|
|
this.detail_name.string = nx.text.getKey("lab_hallows_main_window_tip9")+game.configs.hallows_data.data_skill_attr[data.id][this.sort_index+1].lev_limit
|
||
|
|
this.detail_desc.string = game.configs.hallows_data.data_skill_attr[data.id][this.sort_index+1].desc;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
// update (dt) {},
|
||
|
|
});
|