From 8eb3192c7f808bb8925bb6d75ed86d72c53500dd Mon Sep 17 00:00:00 2001 From: "guoqing.zhu" <1521292690@qq.com> Date: Tue, 31 May 2022 17:35:28 +0800 Subject: [PATCH] update --- assets/res/prefabs/NUI/pb_battlelihui.prefab | 5 ++++- assets/scripts/UI/battlematch/UIChoseHero.js | 3 ++- assets/scripts/UI/battlematch/pbbattleui.js | 5 +++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/assets/res/prefabs/NUI/pb_battlelihui.prefab b/assets/res/prefabs/NUI/pb_battlelihui.prefab index e2990e07..e48a815a 100644 --- a/assets/res/prefabs/NUI/pb_battlelihui.prefab +++ b/assets/res/prefabs/NUI/pb_battlelihui.prefab @@ -1825,7 +1825,7 @@ "__id__": 43 }, "_children": [], - "_active": false, + "_active": true, "_level": 5, "_components": [ { @@ -3200,6 +3200,9 @@ "nd_processbar": { "__id__": 51 }, + "nd_remainceg": { + "__id__": 48 + }, "_id": "" }, { diff --git a/assets/scripts/UI/battlematch/UIChoseHero.js b/assets/scripts/UI/battlematch/UIChoseHero.js index f5a6576d..481eb87d 100644 --- a/assets/scripts/UI/battlematch/UIChoseHero.js +++ b/assets/scripts/UI/battlematch/UIChoseHero.js @@ -161,7 +161,8 @@ cc.Class({ var heroDetail = this.getHeroDetailByID(v.hero_id) 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++) { if (this.herodatalist[i].account_id == v.account_id) { diff --git a/assets/scripts/UI/battlematch/pbbattleui.js b/assets/scripts/UI/battlematch/pbbattleui.js index 7797c303..1092476c 100644 --- a/assets/scripts/UI/battlematch/pbbattleui.js +++ b/assets/scripts/UI/battlematch/pbbattleui.js @@ -42,6 +42,11 @@ cc.Class({ default: null, type: cc.ProgressBar }, + + nd_remainceg:{ + default: null, + type: cc.Label + }, }, // LIFE-CYCLE CALLBACKS: