From 46efdd02de7c7ae62db3bcf1f7564215879fcbcf Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Mon, 19 Apr 2021 15:11:39 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=8B=B1=E9=9B=84=E5=8D=87=E6=98=9F?= =?UTF-8?q?=E7=A5=AD=E5=93=81=E3=80=91=E6=8F=90=E4=BA=A4=E2=80=94=E2=80=94?= =?UTF-8?q?02?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Prefabs/UI/Bag/BagPanel.prefab | 40 +++++++++---------- .../UI/Popup/RewardItemSingleShowPopup.prefab | 36 +++++++++++++++++ .../~Lua/Modules/Bag/BagPanel.lua | 2 + .../Popup/RewardItemSingleShowPopup.lua | 8 +++- .../Modules/RoleInfo/RoleUpStarListPanel.lua | 9 +++-- .../ManagedResources/~Lua/View/ItemView.lua | 6 +++ 6 files changed, 76 insertions(+), 25 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/Bag/BagPanel.prefab b/Assets/ManagedResources/Prefabs/UI/Bag/BagPanel.prefab index a7719c25fe..c517794213 100644 --- a/Assets/ManagedResources/Prefabs/UI/Bag/BagPanel.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Bag/BagPanel.prefab @@ -1683,7 +1683,7 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} @@ -1905,7 +1905,7 @@ RectTransform: m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} @@ -3626,9 +3626,9 @@ RectTransform: m_Father: {fileID: 396553229042369325} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 363.53998, y: -82} m_SizeDelta: {x: 205, y: 126} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &1868846662153907008 @@ -8657,9 +8657,9 @@ RectTransform: m_Father: {fileID: 396553229042369325} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 187.07999, y: -82} m_SizeDelta: {x: 205, y: 126} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7375667482981998849 @@ -8966,7 +8966,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: -21.699951, y: 5.0999756} + m_AnchoredPosition: {x: -21.699951, y: -1.4000015} m_SizeDelta: {x: 442.6, y: 30} m_Pivot: {x: 0, y: 0} --- !u!222 &5700062468445239932 @@ -13908,9 +13908,9 @@ RectTransform: m_Father: {fileID: 396553229042369325} m_RootOrder: 3 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 540, y: -82} m_SizeDelta: {x: 205, y: 126} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5708273588649669632 @@ -14203,9 +14203,9 @@ RectTransform: m_Father: {fileID: 396553229042369325} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 892.92, y: -82} m_SizeDelta: {x: 205, y: 126} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &510730355403680162 @@ -24450,9 +24450,9 @@ RectTransform: m_Father: {fileID: 396553229042369325} m_RootOrder: 4 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 716.45996, y: -82} m_SizeDelta: {x: 205, y: 126} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &5639246604939651318 @@ -25024,8 +25024,8 @@ RectTransform: m_Father: {fileID: 476764887283124951} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 1} m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 2, y: -20} m_Pivot: {x: 0.5, y: 0.5} diff --git a/Assets/ManagedResources/Prefabs/UI/Popup/RewardItemSingleShowPopup.prefab b/Assets/ManagedResources/Prefabs/UI/Popup/RewardItemSingleShowPopup.prefab index ee4fab760c..fdaa9e78fe 100644 --- a/Assets/ManagedResources/Prefabs/UI/Popup/RewardItemSingleShowPopup.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Popup/RewardItemSingleShowPopup.prefab @@ -392,6 +392,7 @@ RectTransform: - {fileID: 224719441058549306} - {fileID: 1373259385693931100} - {fileID: 3702784266758656176} + - {fileID: 2742588676848555960} m_Father: {fileID: 224199271576904048} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -2818,6 +2819,41 @@ MonoBehaviour: m_LineSpacing: 1 m_Text: "\u5206 \u89E3" LanguageIndex: 0 +--- !u!1 &7112658370828396715 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2742588676848555960} + m_Layer: 5 + m_Name: starGameobject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2742588676848555960 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 7112658370828396715} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1.0106667, y: 1.0106667, z: 1.2} + m_Children: [] + m_Father: {fileID: 224560761078020366} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 12.1, y: 14.4} + m_SizeDelta: {x: 150.75, y: 29.09} + m_Pivot: {x: 0, y: 0} --- !u!1 &7493850959433061149 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua b/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua index 88793610c6..15099b6ddf 100644 --- a/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua @@ -369,6 +369,8 @@ function this.SingleItemDataShow(_go, _itemData) Util.GetGameObject(_go.transform, "GameObject/item/fragmentIcon"):SetActive(true) Util.GetGameObject(_go.transform, "GameObject/item/fragmentIcon"):GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(propertyName)) end + talismanStar:SetActive(true) + SetHeroStars(talismanStar, _itemData.itemConfig.HeroStar[1],1,Vector2.New(32.5,32.5),-15) end end local redPoint = Util.GetGameObject(_go.gameObject, "GameObject/redPoint") diff --git a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua index 43b636ef82..c2c4a76b3d 100644 --- a/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Popup/RewardItemSingleShowPopup.lua @@ -21,6 +21,7 @@ function RewardItemSingleShowPopup:InitComponent() this.frameMask = Util.GetGameObject(self.transform, "bg/armorInfo/frameMask") this.frame = Util.GetGameObject(self.transform, "bg/armorInfo/frame") this.pokemonFrame = Util.GetGameObject(self.transform, "bg/armorInfo/pokemonFrame") + this.starGameobject = Util.GetGameObject(self.transform, "bg/armorInfo/starGameobject") this.pokemonImage = Util.GetGameObject(self.transform, "bg/armorInfo/pokemonFrame/pokemonImage"):GetComponent("Image") this.armorType = Util.GetGameObject(self.transform, "bg/armorInfo/armorType"):GetComponent("Text") this.armorLanTuNum = Util.GetGameObject(self.transform, "armorInfo/armorLanTuNum") @@ -251,7 +252,7 @@ end function RewardItemSingleShowPopup:OnShow() this.innateImage:SetActive(false) this.fragmentIcon:SetActive(false) - + this.starGameobject:SetActive(false) --判断自选宝箱界面是否开启 local isBoxOpen = UIManager.IsOpen(314) if isBagPanel and isBoxOpen then @@ -302,11 +303,14 @@ function RewardItemSingleShowPopup:OnShow() end end if itemConfigData.ItemType == ItemType.heroDogFood then - local propertyName=itemConfig[itemConfigData.Id].PropertyName + local propertyName=itemConfigData.PropertyName if(propertyName~=0) then this.fragmentIcon:SetActive(true) this.fragmentIcon:GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(propertyName)) end + this.starGameobject:SetActive(true) + local star = itemConfigData.HeroStar[1] + SetHeroStars(this.starGameobject, star,1,Vector2.New(32.5,32.5),-15) end if itemConfigData.ItemType == 9 then if itemConfigData.RingLevel > 0 then diff --git a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleUpStarListPanel.lua b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleUpStarListPanel.lua index 71855106c4..67d13bf9aa 100644 --- a/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleUpStarListPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/RoleInfo/RoleUpStarListPanel.lua @@ -178,7 +178,6 @@ function this.OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择 local starGrid = Util.GetGameObject(go.transform, "star") local cardBtn = Util.GetGameObject(go.transform, "icon") local GongMingMask = Util.GetGameObject(go.transform, "GongMingMask") - LogYellow("heroData.type "..heroData.type) if heroData.type == RoleUpStarMatType.hero then frame.sprite = Util.LoadSprite(GetHeroQuantityImageByquality(heroData.heroConfig.Quality,heroData.star)) lvGo:SetActive(true) @@ -248,13 +247,17 @@ function this.OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择 end end) elseif heroData.type == RoleUpStarMatType.item then - LogYellow("heroData.id "..heroData.id) local itemConfig = ConfigManager.TryGetConfigData(ConfigName.ItemConfig,heroData.id) if not itemConfig then return end frame.sprite = Util.LoadSprite(GetHeroQuantityImageByquality(itemConfig.Quantity,itemConfig.HeroStar[1])) lvGo:SetActive(false) icon.sprite = Util.LoadSprite(GetResourcePath(itemConfig.ResourceID)) - proIcon:GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(itemConfig.PropertyName)) + if itemConfig.PropertyName and itemConfig.PropertyName > 0 then + proIcon:SetActive(true) + proIcon:GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(itemConfig.PropertyName)) + else + proIcon:SetActive(false) + end formationMask:SetActive(false) formationImage:SetActive(false) lockImage:SetActive(false) diff --git a/Assets/ManagedResources/~Lua/View/ItemView.lua b/Assets/ManagedResources/~Lua/View/ItemView.lua index 8358868acf..cafa3bcedf 100644 --- a/Assets/ManagedResources/~Lua/View/ItemView.lua +++ b/Assets/ManagedResources/~Lua/View/ItemView.lua @@ -245,6 +245,9 @@ function ItemView:GetRewardShow(_itemData, effectLayer) self.fragmentIcon:SetActive(true) self.fragmentIcon:GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(propertyName)) end + self.starGrid:SetActive(true) + local star = _itemData.configData.HeroStar[1] + SetHeroStars(self.starGrid, star,1,Vector2.New(32.5,32.5),-15) else Util.AddOnceClick(self.frameBtn, function() UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, _itemData.backData.itemId,nil,self.isRewardItemPop) @@ -586,6 +589,9 @@ function ItemView:NoGetRewardShow(_reward, effectLayer, isShowAddImage) self.fragmentIcon:SetActive(true) self.fragmentIcon:GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(propertyName)) end + self.starGrid:SetActive(true) + local star = _reward[4] or itemConfig[itemSId].HeroStar[1] + SetHeroStars(self.starGrid, star,1,Vector2.New(32.5,32.5),-15) Util.AddOnceClick(self.frameBtn, function() UIManager.OpenPanel(UIName.RewardItemSingleShowPopup, itemSId,nil,self.isRewardItemPop) end)