diff --git a/assets/res/prefabs/NUI/UIGuninfo.prefab b/assets/res/prefabs/NUI/UIGuninfo.prefab index 6f9b485c..5e28aa97 100644 --- a/assets/res/prefabs/NUI/UIGuninfo.prefab +++ b/assets/res/prefabs/NUI/UIGuninfo.prefab @@ -12020,6 +12020,9 @@ "cegget": { "__id__": 315 }, + "wantedNode": { + "__id__": 292 + }, "_id": "" }, { diff --git a/assets/res/prefabs/NUI/UINheroinfo.prefab b/assets/res/prefabs/NUI/UINheroinfo.prefab index f109ae12..007aa048 100644 --- a/assets/res/prefabs/NUI/UINheroinfo.prefab +++ b/assets/res/prefabs/NUI/UINheroinfo.prefab @@ -20855,6 +20855,9 @@ "cegget": { "__id__": 183 }, + "wantedNode": { + "__id__": 128 + }, "_id": "" }, { diff --git a/assets/res/prefabs/NUI/cell_HeroItemGroup.prefab b/assets/res/prefabs/NUI/cell_HeroItemGroup.prefab index b4e67836..171c28b1 100644 --- a/assets/res/prefabs/NUI/cell_HeroItemGroup.prefab +++ b/assets/res/prefabs/NUI/cell_HeroItemGroup.prefab @@ -4691,6 +4691,9 @@ "cegget": { "__id__": 75 }, + "wantedNode": { + "__id__": 121 + }, "_id": "" }, { @@ -9309,6 +9312,9 @@ "cegget": { "__id__": 208 }, + "wantedNode": { + "__id__": 254 + }, "_id": "" }, { @@ -13927,6 +13933,9 @@ "cegget": { "__id__": 341 }, + "wantedNode": { + "__id__": 387 + }, "_id": "" }, { @@ -18545,6 +18554,9 @@ "cegget": { "__id__": 474 }, + "wantedNode": { + "__id__": 520 + }, "_id": "" }, { diff --git a/assets/res/prefabs/NUI/cell_guns.prefab b/assets/res/prefabs/NUI/cell_guns.prefab index c357e224..4f822fd0 100644 --- a/assets/res/prefabs/NUI/cell_guns.prefab +++ b/assets/res/prefabs/NUI/cell_guns.prefab @@ -3360,6 +3360,9 @@ "cegget": { "__id__": 35 }, + "wantedNode": { + "__id__": 84 + }, "_id": "" }, { @@ -6730,6 +6733,9 @@ "cegget": { "__id__": 133 }, + "wantedNode": { + "__id__": 182 + }, "_id": "" }, { @@ -10100,6 +10106,9 @@ "cegget": { "__id__": 231 }, + "wantedNode": { + "__id__": 280 + }, "_id": "" }, { diff --git a/assets/scripts/UI/guns/guns_info.ts b/assets/scripts/UI/guns/guns_info.ts index e6ba2750..97825e22 100644 --- a/assets/scripts/UI/guns/guns_info.ts +++ b/assets/scripts/UI/guns/guns_info.ts @@ -33,6 +33,11 @@ export default class guns_info extends UIBase { @property(cc.ProgressBar) limitBar:cc.ProgressBar = null; @property(cc.Label) cegget:cc.Label = null; + @property(cc.Node) wantedNode:cc.Node = null; + + showWanted(){ + this.wantedNode.active = true + } protected update(dt: number): void { if (this.scrollView.getScrollOffset().y <= 0) { @@ -60,6 +65,11 @@ export default class guns_info extends UIBase { ["35", this.lab_successrate], ["37", this.lab_naijiu], ]); + console.log(JSON.stringify(data.lock_type)) + + if(data.lock_type==3){ + this.showWanted() + } 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 e1430d1e..377b31a3 100644 --- a/assets/scripts/UI/guns/guns_single.ts +++ b/assets/scripts/UI/guns/guns_single.ts @@ -12,10 +12,17 @@ export class guns_single extends cc.Component { @property(cc.ProgressBar) limitBar:cc.ProgressBar = null; @property(cc.Label) cegget:cc.Label = null; + + @property(cc.Node) wantedNode:cc.Node = null + private curData = {}; private guninfo = {}; + showWanted(){ + this.wantedNode.active = true + } + init(data) { if (data == 0) { @@ -24,7 +31,11 @@ export class guns_single extends cc.Component { } var limit = data.ceg_uplimit var get = data.today_get_gold + console.log(JSON.stringify(data.lock_type)) + if(data.lock_type==3){ + this.showWanted() + } if(this.limitBar)this.limitBar.progress =(limit-get)/limit if(this.cegget)this.cegget.string = `${limit-data.today_get_gold}/${data.ceg_uplimit}` diff --git a/assets/scripts/UI/hero/UIHeroinfo.ts b/assets/scripts/UI/hero/UIHeroinfo.ts index 3f0672ee..33477d53 100644 --- a/assets/scripts/UI/hero/UIHeroinfo.ts +++ b/assets/scripts/UI/hero/UIHeroinfo.ts @@ -78,10 +78,16 @@ export class UIHeroinfo extends UIBase { @property(cc.Label) cegget:cc.Label = null; + @property(cc.Node) wantedNode:cc.Node = null + private hero_id = 0; private allSkins = []; private curentBuyId = 0; + showWanted(){ + this.wantedNode.active = true + } + protected update(dt: number): void { if (this.infoScrollview.getScrollOffset().y <= 0) { this.arrow_down.active = true; @@ -102,6 +108,11 @@ export class UIHeroinfo extends UIBase { init(data: any) { + console.log(JSON.stringify(data.lock_type)) + if(data.lock_type==3){ + this.showWanted() + } + // var limit = data.ceg_uplimit var get = data.today_get_gold diff --git a/assets/scripts/UI/hero/herochoseone.js b/assets/scripts/UI/hero/herochoseone.js index 60581ca7..57dc9ce0 100644 --- a/assets/scripts/UI/hero/herochoseone.js +++ b/assets/scripts/UI/hero/herochoseone.js @@ -34,8 +34,17 @@ cc.Class({ type: cc.Label, }, + wantedNode: { + default: null, + type: cc.Node, + }, + }, + showWanted(){ + this.wantedNode.active = true + }, + initdata(v) { this._data = v; if (v != 0) { @@ -44,6 +53,11 @@ cc.Class({ this.node.active = false; return; } + + console.log(JSON.stringify(v.lock_type)) + if(v.lock_type==3){ + this.showWanted() + } // @@ -54,6 +68,8 @@ cc.Class({ if(this.cegget) this.cegget.string = `${limit-v.today_get_gold}/${v.ceg_uplimit}` + + this.hero_id = v.hero_id; var self = this; var cfg = gameConfig.playerConfig[v.hero_id];