【法宝聚灵】背包和掉落界面不显示碎片框

dev_chengFeng
gaoxin 2021-11-22 12:01:16 +08:00
parent 047e5cbe72
commit b10dad4285
2 changed files with 36 additions and 20 deletions

View File

@ -348,6 +348,8 @@ function this.SingleItemDataShow(_go, _itemData)
end end
upHeroInage:SetActive(false) upHeroInage:SetActive(false)
local frameMask = Util.GetGameObject(_go.transform, "GameObject/item/frameMask") local frameMask = Util.GetGameObject(_go.transform, "GameObject/item/frameMask")
local frameMaskExp = Util.GetGameObject(_go.transform, "GameObject/item/frameMask/exp")
local frameMaskExpMask = Util.GetGameObject(_go.transform, "GameObject/item/frameMask/mask")
frameMask:SetActive(false) frameMask:SetActive(false)
local num = Util.GetGameObject(_go.gameObject, "GameObject/item/num") local num = Util.GetGameObject(_go.gameObject, "GameObject/item/num")
local strongLv=Util.GetGameObject(_go.gameObject, "GameObject/item/lv"):GetComponent("Text") local strongLv=Util.GetGameObject(_go.gameObject, "GameObject/item/lv"):GetComponent("Text")
@ -386,6 +388,14 @@ function this.SingleItemDataShow(_go, _itemData)
elseif _itemData.itemConfig.ItemType == ItemType.Pokemon then elseif _itemData.itemConfig.ItemType == ItemType.Pokemon then
Util.GetGameObject(_go.gameObject, "GameObject/item/frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(YaoHunFrame[_itemData.quality]) Util.GetGameObject(_go.gameObject, "GameObject/item/frame"):GetComponent("Image").sprite = this.spLoader:LoadSprite(YaoHunFrame[_itemData.quality])
num:SetActive(false) num:SetActive(false)
-- 法宝聚灵显示碎片边框
elseif _itemData.itemConfig.ItemType == ItemType.talismanSoulChip then
frameMask:SetActive(true)
frameMaskExp:SetActive(false)
frameMaskExpMask:SetActive(false)
frameMask:GetComponent("Image").sprite = this.spLoader:LoadSprite("f_fabaojuling_zijiemianfabaokuang1")
elseif _itemData.itemConfig.ItemType == ItemType.HeroDebris then elseif _itemData.itemConfig.ItemType == ItemType.HeroDebris then
frameMask:SetActive(true) frameMask:SetActive(true)
num:SetActive(false) num:SetActive(false)
@ -393,13 +403,9 @@ function this.SingleItemDataShow(_go, _itemData)
Util.GetGameObject(_go.transform, "GameObject/item/frameMask/exp/Text"):GetComponent("Text").text = BagManager.GetItemCountById(_itemData.itemConfig.Id) .. "/" .. _itemData.itemConfig.UsePerCount Util.GetGameObject(_go.transform, "GameObject/item/frameMask/exp/Text"):GetComponent("Text").text = BagManager.GetItemCountById(_itemData.itemConfig.Id) .. "/" .. _itemData.itemConfig.UsePerCount
local curExpVal = BagManager.GetItemCountById(_itemData.itemConfig.Id) / _itemData.itemConfig.UsePerCount local curExpVal = BagManager.GetItemCountById(_itemData.itemConfig.Id) / _itemData.itemConfig.UsePerCount
local expValue = curExpVal >= 1 and 1 or curExpVal local expValue = curExpVal >= 1 and 1 or curExpVal
Util.GetGameObject(_go.transform, "GameObject/item/frameMask/exp"):GetComponent("Slider").value = expValue frameMaskExp:SetActive(true)
local expMask = Util.GetGameObject(_go.transform, "GameObject/item/frameMask/mask") frameMaskExp:GetComponent("Slider").value = expValue
if expValue >= 1 then frameMaskExpMask:SetActive(expValue >= 1)
expMask:SetActive(true)
else
expMask:SetActive(false)
end
local propertyName = itemConfig[_itemData.itemConfig.Id].PropertyName local propertyName = itemConfig[_itemData.itemConfig.Id].PropertyName
if (propertyName ~= 0) then if (propertyName ~= 0) then
fragmentIcon.gameObject:SetActive(true) fragmentIcon.gameObject:SetActive(true)

View File

@ -247,19 +247,29 @@ function ItemView:GetRewardShow(_itemData, effectLayer)
UIManager.OpenPanel(UIName.SoulPrintPopUp, ShowType.showTip3, nil,_itemData.backData.itemId) UIManager.OpenPanel(UIName.SoulPrintPopUp, ShowType.showTip3, nil,_itemData.backData.itemId)
end) end)
elseif _itemData.configData.ItemType == ItemType.heroDogFood then --狗粮 elseif _itemData.configData.ItemType == ItemType.heroDogFood then --狗粮
--狗粮 --狗粮
Util.AddOnceClick(self.frameBtn, function() Util.AddOnceClick(self.frameBtn, function()
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.backData.itemId,nil,self.isRewardItemPop) UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.backData.itemId,nil,self.isRewardItemPop)
end) end)
self.heroShowGo:SetActive(true) self.heroShowGo:SetActive(true)
local propertyName=itemConfig[_itemData.backData.itemId].PropertyName local propertyName=itemConfig[_itemData.backData.itemId].PropertyName
if(propertyName~=0) then if(propertyName~=0) then
self.fragmentIcon:SetActive(true) self.fragmentIcon:SetActive(true)
self.fragmentIcon:GetComponent("Image").sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(propertyName)) self.fragmentIcon:GetComponent("Image").sprite = self.spLoader:LoadSprite(GetProStrImageByProNum(propertyName))
end end
self.starGrid:SetActive(true) self.starGrid:SetActive(true)
local star = _itemData.configData.HeroStar[1] local star = _itemData.configData.HeroStar[1]
SetHeroStars(self.spLoader,self.starGrid, star,1,Vector2.New(32.5,32.5),-15) SetHeroStars(self.spLoader,self.starGrid, star,1,Vector2.New(32.5,32.5),-15)
elseif _itemData.configData.ItemType == ItemType.talismanSoulChip then
self.num:SetActive(false)
self.frame.sprite = self.spLoader:LoadSprite(GetQuantityImageByquality(itemConfig[_itemData.backData.itemId].Quantity))
self.frameMask:SetActive(true)
self.frameMask:GetComponent("Image").sprite = self.spLoader:LoadSprite("f_fabaojuling_zijiemianfabaokuang1")
self.icon.sprite = self.spLoader:LoadSprite(GetResourcePath(itemConfig[_itemData.backData.itemId].ResourceID))
self.starGrid:SetActive(false)
Util.AddOnceClick(self.frameBtn, function()
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup,_itemData.backData.itemId,nil,self.isRewardItemPop,true)
end)
else else
Util.AddOnceClick(self.frameBtn, function() Util.AddOnceClick(self.frameBtn, function()
UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.backData.itemId,nil,self.isRewardItemPop) UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.backData.itemId,nil,self.isRewardItemPop)