update settlement
This commit is contained in:
parent
2a052ac0aa
commit
19751ba3d4
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
|||||||
var battlenet = require('battlenetmanage');
|
var battlenet = require('battlenetmanage');
|
||||||
var SDKManage = require('SDKManage');
|
var SDKManage = require('SDKManage');
|
||||||
|
const { type } = require('../netBattle/net/proto/bytebuffer');
|
||||||
cc.Class({
|
cc.Class({
|
||||||
extends: cc.Component,
|
extends: cc.Component,
|
||||||
|
|
||||||
@ -142,6 +143,21 @@ cc.Class({
|
|||||||
gun2_bar:{
|
gun2_bar:{
|
||||||
default:null,
|
default:null,
|
||||||
type:cc.ProgressBar
|
type:cc.ProgressBar
|
||||||
|
},
|
||||||
|
|
||||||
|
hero_remain:{
|
||||||
|
default:null,
|
||||||
|
type:cc.Label
|
||||||
|
},
|
||||||
|
|
||||||
|
gun1_remain:{
|
||||||
|
default:null,
|
||||||
|
type:cc.Label
|
||||||
|
},
|
||||||
|
|
||||||
|
gun2_remain:{
|
||||||
|
default:null,
|
||||||
|
type:cc.Label
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -215,33 +231,37 @@ cc.Class({
|
|||||||
// infos
|
// infos
|
||||||
// hero
|
// hero
|
||||||
if(v.hero_stats){
|
if(v.hero_stats){
|
||||||
this.hero_bar.node.active = true;
|
|
||||||
this.heroName.string = v.hero_stats.hero_name;
|
this.heroName.string = v.hero_stats.hero_name;
|
||||||
this.hero_reward.string = v.hero_stats.reward_ceg;
|
this.hero_reward.string = v.hero_stats.reward_ceg;
|
||||||
this.hero_bar.progress = (v.hero_stats.today_get_ceg + v.hero_stats.reward_ceg) / v.hero_stats.ceg_uplimit;
|
this.hero_bar.progress = (v.hero_stats.today_get_ceg + v.hero_stats.reward_ceg) / v.hero_stats.ceg_uplimit;
|
||||||
|
this.hero_remain.string = v.hero_stats.ceg_uplimit - (v.hero_stats.today_get_ceg + v.hero_stats.reward_ceg)
|
||||||
total+=parseInt(v.hero_stats.reward_ceg);
|
total+=parseInt(v.hero_stats.reward_ceg);
|
||||||
}
|
}
|
||||||
// weapons
|
// weapons
|
||||||
if(v.weapons_stats){
|
if(v.weapons_stats){
|
||||||
if(v.weapons_stats[0]){
|
if(v.weapons_stats[0]){
|
||||||
//gun1
|
//gun1
|
||||||
this.gun1_bar.node.active = true
|
this.gun1_bar.node.active = true;
|
||||||
this.gun1_reward.node.active = true;
|
this.gun1_reward.node.active = true;
|
||||||
this.gunt1Name.node.active = true;
|
this.gunt1Name.node.active = true;
|
||||||
|
this.gun1_remain.node.active = true;
|
||||||
this.gunt1Name.string = v.weapons_stats[0].weapon_name;
|
this.gunt1Name.string = v.weapons_stats[0].weapon_name;
|
||||||
this.gun1_reward.string = v.weapons_stats[0].reward_ceg;
|
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].reward_ceg) / v.weapons_stats[0].ceg_uplimit;
|
this.gun1_bar.progress = (v.weapons_stats[0].today_get_ceg + v.weapons_stats[0].reward_ceg) / v.weapons_stats[0].ceg_uplimit;
|
||||||
total+=parseInt(v.weapons_stats[0].reward_ceg)
|
this.gun1_remain.string = v.weapons_stats[0].ceg_uplimit - (v.weapons_stats[0].today_get_ceg + v.weapons_stats[0].reward_ceg)
|
||||||
|
total+=parseInt(v.weapons_stats[0].reward_ceg);
|
||||||
}
|
}
|
||||||
if(v.weapons_stats[1]){
|
if(v.weapons_stats[1]){
|
||||||
//gun2
|
//gun2
|
||||||
this.gun2_bar.node.active = true
|
this.gun2_bar.node.active = true;
|
||||||
this.gunt2Name.node.active = true;
|
this.gunt2Name.node.active = true;
|
||||||
this.gun2_reward.node.active = true;
|
this.gun2_reward.node.active = true;
|
||||||
|
this.gun2_remain.node.active = true;
|
||||||
this.gunt2Name.string = v.weapons_stats[1].weapon_name;
|
this.gunt2Name.string = v.weapons_stats[1].weapon_name;
|
||||||
this.gun2_reward.string = v.weapons_stats[1].reward_ceg;
|
this.gun2_reward.string = v.weapons_stats[1].reward_ceg;
|
||||||
this.gun2_bar.progress = (v.weapons_stats[1].today_get_ceg + v.weapons_stats[1].reward_ceg) / v.weapons_stats[0].ceg_uplimit;
|
this.gun2_bar.progress = (v.weapons_stats[1].today_get_ceg + v.weapons_stats[1].reward_ceg) / v.weapons_stats[1].ceg_uplimit;
|
||||||
total+=parseInt(v.weapons_stats[1].reward_ceg)
|
this.gun2_remain.string = v.weapons_stats[1].ceg_uplimit - (v.weapons_stats[1].today_get_ceg + v.weapons_stats[1].reward_ceg);
|
||||||
|
total+=parseInt(v.weapons_stats[1].reward_ceg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user