From e83e9ae889ddc2f4aa5a89cf0bd51b3d2d4e3119 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Fri, 9 Apr 2021 19:08:59 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E9=AD=82=E5=8D=B0=E3=80=91=E8=B4=AD?= =?UTF-8?q?=E4=B9=B0=E7=A1=AE=E8=AE=A4=E7=95=8C=E9=9D=A2=E7=9A=84=E9=AD=82?= =?UTF-8?q?=E5=8D=B0=E5=9B=BE=E6=A0=87=E9=94=99=E8=AF=AF=EF=BC=8C=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E6=B7=BB=E5=8A=A0=E5=9C=86=E5=BD=A2=E9=81=AE=E7=BD=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Prefabs/UI/Shop/ShopBuyPopup.prefab | 77 ++++++++++++++++++- .../~Lua/Modules/Shop/ShopBuyPopup.lua | 13 +++- 2 files changed, 88 insertions(+), 2 deletions(-) diff --git a/Assets/ManagedResources/Prefabs/UI/Shop/ShopBuyPopup.prefab b/Assets/ManagedResources/Prefabs/UI/Shop/ShopBuyPopup.prefab index abd4e5a52c..d0f5ca80a8 100644 --- a/Assets/ManagedResources/Prefabs/UI/Shop/ShopBuyPopup.prefab +++ b/Assets/ManagedResources/Prefabs/UI/Shop/ShopBuyPopup.prefab @@ -1831,7 +1831,8 @@ RectTransform: m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} - m_Children: [] + m_Children: + - {fileID: 2860712723561697874} m_Father: {fileID: 224385547185248858} m_RootOrder: 1 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -2938,6 +2939,80 @@ MonoBehaviour: m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 +--- !u!1 &2948705858852123875 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2860712723561697874} + - component: {fileID: 5407517704538972253} + - component: {fileID: 790476786930405948} + m_Layer: 5 + m_Name: circleFrame + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2860712723561697874 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2948705858852123875} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 100.00805} + m_LocalScale: {x: 1, y: 1, z: 0} + m_Children: [] + m_Father: {fileID: 224334288354510334} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: -90} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 133, y: 133} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &5407517704538972253 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2948705858852123875} + m_CullTransparentMesh: 0 +--- !u!114 &790476786930405948 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2948705858852123875} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI, + Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + m_Sprite: {fileID: 21300000, guid: ccbe3f5ba196f954fafc862594cebf24, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 --- !u!1 &5369005423993746728 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/ManagedResources/~Lua/Modules/Shop/ShopBuyPopup.lua b/Assets/ManagedResources/~Lua/Modules/Shop/ShopBuyPopup.lua index 0fd9177ba6..e8a5a30d75 100644 --- a/Assets/ManagedResources/~Lua/Modules/Shop/ShopBuyPopup.lua +++ b/Assets/ManagedResources/~Lua/Modules/Shop/ShopBuyPopup.lua @@ -6,6 +6,7 @@ local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig) function ShopBuyPopup:InitComponent() this.itemBg = Util.GetGameObject(self.gameObject, "tipImage/item/bg"):GetComponent("Image") this.itemIcon = Util.GetGameObject(self.gameObject, "tipImage/item/icon"):GetComponent("Image") + this.circleFrame = Util.GetGameObject(this.itemIcon.gameObject, "circleFrame"):GetComponent("Image") this.itemNum = Util.GetGameObject(self.gameObject, "tipImage/item/num"):GetComponent("Text") this.itemCount = Util.GetGameObject(self.gameObject, "tipImage/item/count"):GetComponent("Text") this.itemName = Util.GetGameObject(self.gameObject, "tipImage/item/name"):GetComponent("Text") @@ -106,8 +107,10 @@ function ShopBuyPopup:OnOpen(shopType, shopItemId) local itemConfig = ConfigManager.GetConfig(ConfigName.ItemConfig) this.itemContent.text = string.gsub(GetLanguageStrById(itemConfig[goodsId].ItemDescribe), "\\n", "\n") this.itemIcon.sprite = SetIcon(goodsId) - LogGreen("itemConfig[this.shopItemInfo.Goods[1][1]].ItemType:"..itemConfig[this.shopItemInfo.Goods[1][1]].ItemType) + this.itemIcon.gameObject:GetComponent("RectTransform").localScale = Vector3.one + LogGreen("ItemType:"..itemConfig[this.shopItemInfo.Goods[1][1]].ItemType) this.itemBg.sprite = SetFrame(goodsId) + this.circleFrame.gameObject:SetActive(false) if itemConfig[this.shopItemInfo.Goods[1][1]].ItemType == 2 then Util.GetGameObject(self.gameObject,"tipImage/item/chip").gameObject:SetActive(true) Util.GetGameObject(self.gameObject,"tipImage/item/chip"):GetComponent("Image").sprite = Util.LoadSprite(GetHeroChipQuantityImageByquality(itemConfig[this.shopItemInfo.Goods[1][1]].Quantity)) @@ -117,6 +120,14 @@ function ShopBuyPopup:OnOpen(shopType, shopItemId) else Util.GetGameObject(self.gameObject, "tipImage/item/proima"):SetActive(false) end + elseif itemConfig[this.shopItemInfo.Goods[1][1]].ItemType == 13 then + this.itemIcon.gameObject:GetComponent("RectTransform").localScale = Vector3.one*0.9 + this.circleFrame.gameObject:SetActive(true) + this.circleFrame.gameObject:GetComponent("RectTransform").localScale = Vector3.one*1.2 + -- LogPink(tostring(this.shopItemInfo.Goods[1][1]).." "..tostring(itemConfig[this.shopItemInfo.Goods[1][1]].Quantity).." "..tostring(SoulPrintSpriteByQuantity[itemConfig[this.shopItemInfo.Goods[1][1]].Quantity].circleBg2)) + this.circleFrame.sprite = Util.LoadSprite(SoulPrintSpriteByQuantity[itemConfig[this.shopItemInfo.Goods[1][1]].Quantity].circle) + Util.GetGameObject(self.gameObject,"tipImage/item/chip").gameObject:SetActive(false) + Util.GetGameObject(self.gameObject, "tipImage/item/proima"):SetActive(false) else Util.GetGameObject(self.gameObject,"tipImage/item/chip").gameObject:SetActive(false) Util.GetGameObject(self.gameObject, "tipImage/item/proima"):SetActive(false)