This commit is contained in:
guoqing.zhu 2022-05-31 17:35:28 +08:00
parent d70f99e280
commit 8eb3192c7f
3 changed files with 11 additions and 2 deletions

View File

@ -1825,7 +1825,7 @@
"__id__": 43 "__id__": 43
}, },
"_children": [], "_children": [],
"_active": false, "_active": true,
"_level": 5, "_level": 5,
"_components": [ "_components": [
{ {
@ -3200,6 +3200,9 @@
"nd_processbar": { "nd_processbar": {
"__id__": 51 "__id__": 51
}, },
"nd_remainceg": {
"__id__": 48
},
"_id": "" "_id": ""
}, },
{ {

View File

@ -161,7 +161,8 @@ cc.Class({
var heroDetail = this.getHeroDetailByID(v.hero_id) var heroDetail = this.getHeroDetailByID(v.hero_id)
var process = (heroDetail.ceg_uplimit - heroDetail.today_get_gold) / heroDetail.ceg_uplimit; var process = (heroDetail.ceg_uplimit - heroDetail.today_get_gold) / heroDetail.ceg_uplimit;
this.node.getComponentInChildren("pbbattleui").nd_processbar.progress = process this.node.getComponentInChildren("pbbattleui").nd_processbar.progress = process;
this.node.getComponentInChildren("pbbattleui").nd_remainceg.string = heroDetail.ceg_uplimit - heroDetail.today_get_gold;
for (var i = 0; i < this.herodatalist.length; i++) { for (var i = 0; i < this.herodatalist.length; i++) {
if (this.herodatalist[i].account_id == v.account_id) { if (this.herodatalist[i].account_id == v.account_id) {

View File

@ -42,6 +42,11 @@ cc.Class({
default: null, default: null,
type: cc.ProgressBar type: cc.ProgressBar
}, },
nd_remainceg:{
default: null,
type: cc.Label
},
}, },
// LIFE-CYCLE CALLBACKS: // LIFE-CYCLE CALLBACKS: