This commit is contained in:
guoqing.zhu 2022-05-30 13:02:41 +08:00
parent a2b75353ef
commit d88f2ebe56
2 changed files with 1382 additions and 648 deletions

File diff suppressed because it is too large Load Diff

View File

@ -112,6 +112,36 @@ cc.Class({
total_reward:{
default:null,
type:cc.Label
},
// limit
hero_limit:{
default:null,
type:cc.Label
},
gun1_limit:{
default:null,
type:cc.Label
},
gun2_limit:{
default:null,
type:cc.Label
},
hero_bar:{
default:null,
type:cc.ProgressBar
},
gun1_bar:{
default:null,
type:cc.ProgressBar
},
gun2_bar:{
default:null,
type:cc.ProgressBar
}
},
@ -185,27 +215,32 @@ cc.Class({
// infos
// hero
if(v.hero_stats){
console.log(`hero reward----${v.hero_stats.reward_ceg}`)
this.hero_bar.node.active = true;
this.heroName.string = v.hero_stats.hero_name;
this.hero_reward.string = v.hero_stats.reward_ceg;
this.hero_bar.progress = v.hero_stats.today_get_ceg / v.hero_stats.ceg_uplimit;
total+=parseInt(v.hero_stats.reward_ceg);
}
// weapons
if(v.weapons_stats){
if(v.weapons_stats[0]){
//gun1
this.gun1_bar.node.active = true
this.gun1_reward.node.active = true;
this.gunt1Name.node.active = true;
this.gunt1Name.string = v.weapons_stats[0].weapon_name;
this.gun1_reward.string = v.weapons_stats[0].reward_ceg;
this.gun1_bar.progress = v.weapons_stats[0].today_get_ceg / v.weapons_stats[0].ceg_uplimit;
total+=parseInt(v.weapons_stats[0].reward_ceg)
}
if(v.weapons_stats[1]){
//gun2
this.gun2_bar.node.active = true
this.gunt2Name.node.active = true;
this.gun2_reward.node.active = true;
this.gunt2Name.string = v.weapons_stats[1].weapon_name;
this.gun2_reward.string = v.weapons_stats[1].reward_ceg;
this.gun2_bar.progress = v.weapons_stats[1].today_get_ceg / v.weapons_stats[0].ceg_uplimit;
total+=parseInt(v.weapons_stats[1].reward_ceg)
}
}