From e0ef810593f2870a159343bd23e51e8846268b2b Mon Sep 17 00:00:00 2001 From: "guoqing.zhu" <1521292690@qq.com> Date: Mon, 6 Jun 2022 09:57:12 +0800 Subject: [PATCH] update --- assets/scripts/UI/guns/guns_info.ts | 5 ++++- assets/scripts/UI/guns/guns_single.ts | 2 ++ assets/scripts/UI/hero/UIHeroinfo.ts | 4 +++- assets/scripts/UI/hero/herochoseone.js | 4 +++- assets/scripts/UI/task/mission_choose.js | 11 ++++++++--- assets/scripts/UI/task/mission_chooseDetail.js | 4 ++-- assets/scripts/UI/task/singleWanted.js | 5 ++++- 7 files changed, 26 insertions(+), 9 deletions(-) diff --git a/assets/scripts/UI/guns/guns_info.ts b/assets/scripts/UI/guns/guns_info.ts index 97825e22..b4d1efde 100644 --- a/assets/scripts/UI/guns/guns_info.ts +++ b/assets/scripts/UI/guns/guns_info.ts @@ -69,7 +69,10 @@ export default class guns_info extends UIBase { if(data.lock_type==3){ this.showWanted() - } + }else{ + this.wantedNode.active = false + + } const imgConfigs = all_ItemConfig[data.gun_id]; this.title.getComponent(cc.Label).string = imgConfigs.name; diff --git a/assets/scripts/UI/guns/guns_single.ts b/assets/scripts/UI/guns/guns_single.ts index 377b31a3..3b7b9aa9 100644 --- a/assets/scripts/UI/guns/guns_single.ts +++ b/assets/scripts/UI/guns/guns_single.ts @@ -35,6 +35,8 @@ export class guns_single extends cc.Component { if(data.lock_type==3){ this.showWanted() + }else{ + this.wantedNode.active = false } if(this.limitBar)this.limitBar.progress =(limit-get)/limit diff --git a/assets/scripts/UI/hero/UIHeroinfo.ts b/assets/scripts/UI/hero/UIHeroinfo.ts index 33477d53..7362e2ce 100644 --- a/assets/scripts/UI/hero/UIHeroinfo.ts +++ b/assets/scripts/UI/hero/UIHeroinfo.ts @@ -111,7 +111,9 @@ export class UIHeroinfo extends UIBase { console.log(JSON.stringify(data.lock_type)) if(data.lock_type==3){ this.showWanted() - } + }else{ + this.wantedNode.active = false + } // var limit = data.ceg_uplimit diff --git a/assets/scripts/UI/hero/herochoseone.js b/assets/scripts/UI/hero/herochoseone.js index 57dc9ce0..57fe44d3 100644 --- a/assets/scripts/UI/hero/herochoseone.js +++ b/assets/scripts/UI/hero/herochoseone.js @@ -57,7 +57,9 @@ cc.Class({ console.log(JSON.stringify(v.lock_type)) if(v.lock_type==3){ this.showWanted() - } + }else{ + this.wantedNode.active = false + } // diff --git a/assets/scripts/UI/task/mission_choose.js b/assets/scripts/UI/task/mission_choose.js index 7ed9dc27..6ce34391 100644 --- a/assets/scripts/UI/task/mission_choose.js +++ b/assets/scripts/UI/task/mission_choose.js @@ -151,18 +151,23 @@ cc.Class({ onLoad() { cc.Notifier.on('hasChooseHero', this, (data) => { - this.herolistNode.children[this.currentBtn] + if(this.herolistNode){ + this.herolistNode.children[this.currentBtn] .getComponent('mission_oneBox') .init(data); this.allChooseHero[this.currentBtn] = data; + } + }); cc.Notifier.on('hasChooseGun', this, (data) => { - console.log(JSON.stringify(data)) - this.gunlistNode.children[this.currentBtn] + if(this.gunlistNode){ + this.gunlistNode.children[this.currentBtn] .getComponent('mission_oneBox') .init(data); this.allChooseGun[this.currentBtn] = data; + } + }); // cc.Notifier.on('ClearOneBox', this, (data) => { diff --git a/assets/scripts/UI/task/mission_chooseDetail.js b/assets/scripts/UI/task/mission_chooseDetail.js index ae25efce..182dcdc0 100644 --- a/assets/scripts/UI/task/mission_chooseDetail.js +++ b/assets/scripts/UI/task/mission_chooseDetail.js @@ -113,7 +113,7 @@ cc.Class({ }); //set cover if ( - this.allHasGotHero.includes(element.hero_uniid.toString()) + this.allHasGotHero.includes(element.hero_uniid.toString()) || element.lock_type==3 ) { node.getComponent('wantedHero').showCover(); } @@ -141,7 +141,7 @@ cc.Class({ }); if ( - this.allHasGotGun.includes(element.gun_uniid.toString()) + this.allHasGotGun.includes(element.gun_uniid.toString()) || element.lock_type==3 ) { node.getComponent('wantedHero').showCover(); } diff --git a/assets/scripts/UI/task/singleWanted.js b/assets/scripts/UI/task/singleWanted.js index 5509f008..c669c495 100644 --- a/assets/scripts/UI/task/singleWanted.js +++ b/assets/scripts/UI/task/singleWanted.js @@ -65,7 +65,10 @@ cc.Class({ onCancelBtn(){ cc.uiHelper.showTips('Boost cancel!'); NetManage.cancelOfferRewardMission(this.missionId,()=>{ - + this.boostNode.active = false + this.receiveNode.active = false + this.getNode.active = true + this.lb_time.node.parent.active = false }) },