diff --git a/Assets/ManagedResources/Atlas/TagAtlas/ArtFont/s_shop_fabao_zh.png b/Assets/ManagedResources/Atlas/TagAtlas/ArtFont/s_shop_fabao_zh.png new file mode 100644 index 0000000000..146ca8c30e Binary files /dev/null and b/Assets/ManagedResources/Atlas/TagAtlas/ArtFont/s_shop_fabao_zh.png differ diff --git a/Assets/ManagedResources/Atlas/TagAtlas/ArtFont/s_shop_fabao_zh.png.meta b/Assets/ManagedResources/Atlas/TagAtlas/ArtFont/s_shop_fabao_zh.png.meta new file mode 100644 index 0000000000..62a600dd2c --- /dev/null +++ b/Assets/ManagedResources/Atlas/TagAtlas/ArtFont/s_shop_fabao_zh.png.meta @@ -0,0 +1,110 @@ +fileFormatVersion: 2 +guid: 3cd6c987a44bf9b439544aa00e4b6fac +TextureImporter: + fileIDToRecycleName: {} + externalObjects: {} + serializedVersion: 9 + mipmaps: + mipMapMode: 0 + enableMipMap: 0 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapsPreserveCoverage: 0 + alphaTestReferenceValue: 0.5 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 2 + aniso: -1 + mipBias: -100 + wrapU: 1 + wrapV: 1 + wrapW: 1 + nPOTScale: 0 + lightmap: 0 + compressionQuality: 50 + spriteMode: 1 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spritePixelsToUnits: 100 + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spriteGenerateFallbackPhysicsShape: 1 + alphaUsage: 1 + alphaIsTransparency: 1 + spriteTessellationDetail: -1 + textureType: 8 + textureShape: 1 + singleChannelComponent: 0 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - serializedVersion: 2 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 65 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: 56 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 1 + androidETC2FallbackOverride: 0 + - serializedVersion: 2 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + androidETC2FallbackOverride: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: 6e749eedc1279a347bbb93c83e7c2af2 + vertices: [] + indices: + edges: [] + weights: [] + spritePackingTag: TagAtlas + pSDRemoveMatte: 0 + pSDShowRemoveMatteOption: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ManagedResources/Prefabs/UI/ShopView/ShopView.prefab b/Assets/ManagedResources/Prefabs/UI/ShopView/ShopView.prefab index eb62ac0214..fa9519202e 100644 --- a/Assets/ManagedResources/Prefabs/UI/ShopView/ShopView.prefab +++ b/Assets/ManagedResources/Prefabs/UI/ShopView/ShopView.prefab @@ -3255,6 +3255,86 @@ MonoBehaviour: m_FillClockwise: 1 m_FillOrigin: 0 m_UseSpriteMesh: 0 +--- !u!1 &1810305470530109251 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1010443535508162794} + - component: {fileID: 6740092622433103058} + - component: {fileID: 3600120418963125822} + m_Layer: 5 + m_Name: itemDes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1010443535508162794 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1810305470530109251} + 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_Father: {fileID: 3094864558833778807} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 1.6000385, y: -4} + m_SizeDelta: {x: 188.58, y: 46.03} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6740092622433103058 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1810305470530109251} + m_CullTransparentMesh: 0 +--- !u!114 &3600120418963125822 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1810305470530109251} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ebfe0e44da74fbd44b1b744995de2324, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.27450982, g: 0.11764706, b: 0.07058824, 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_FontData: + m_Font: {fileID: 12800000, guid: 4b73e9e4512d17e4daeea351e090d33c, type: 3} + m_FontSize: 25 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 44 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 1 + m_VerticalOverflow: 1 + m_LineSpacing: 0.7 + m_Text: "\u8FD9\u662F\u4E94\u4E2A\u5B57" + LanguageIndex: 10412 --- !u!1 &1961499522376103852 GameObject: m_ObjectHideFlags: 0 @@ -4032,7 +4112,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 1.6000385, y: -19.2} + m_AnchoredPosition: {x: 1.6000385, y: -32} m_SizeDelta: {x: 188.58, y: 46.03} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &3096225094805375901 @@ -4114,6 +4194,7 @@ RectTransform: - {fileID: 224153050928386494} - {fileID: 224349495243028422} - {fileID: 224180545808046118} + - {fileID: 1010443535508162794} m_Father: {fileID: 4300363014719737227} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/ManagedResources/~Lua/View/ShopView.lua b/Assets/ManagedResources/~Lua/View/ShopView.lua index f0a300d7f7..ce8bb7b73c 100644 --- a/Assets/ManagedResources/~Lua/View/ShopView.lua +++ b/Assets/ManagedResources/~Lua/View/ShopView.lua @@ -479,6 +479,7 @@ function this:ShopItemAdapter(shopItem, itemData) local bg = Util.GetGameObject(shopItem, "GameObject/bg") local item = Util.GetGameObject(bg, "item") local itemName = Util.GetGameObject(bg, "itemName"):GetComponent("Text") + local itemDes = Util.GetGameObject(bg, "itemDes"):GetComponent("Text") local limitBg = Util.GetGameObject(bg, "buyLimitbg") local limitTip = Util.GetGameObject(limitBg, "tip"):GetComponent("Text") local priceBg = Util.GetGameObject(bg, "pricebg") @@ -491,7 +492,9 @@ function this:ShopItemAdapter(shopItem, itemData) local lockTip = Util.GetGameObject(shopItem, "lock/tip"):GetComponent("Text") local new = Util.GetGameObject(shopItem, "GameObject/new") -- 计算数据 + LogError("11111111111111") local itemInfo = ShopManager.GetShopItemInfo(itemData.id) + local curBuyCount = itemData.buyNum local maxLimitCount = ShopManager.GetShopItemLimitBuyCount(itemData.id) local costId, price = ShopManager.calculateBuyCost(self.ShopType, itemData.id, 1) @@ -503,6 +506,20 @@ function this:ShopItemAdapter(shopItem, itemData) local haveCount = BagManager.GetTotalItemNum(con.Id) itemName.text = itemName.text.."\n"..string.format("%s(%s/%s)",UIColorStr.BLACK, "25", "拥有:", haveCount, con.UsePerCount) end + if con.ItemType == ItemType.Talisman then + itemDes.gameObject:SetActive(true) + if con.ItemDescribe then + local str=string.split(con.ItemDescribe,',') + if str[1] then + itemDes.text=str[1] + end + else + itemDes.gameObject:SetActive(false) + end + + else + itemDes.gameObject:SetActive(false) + end --itemInfo.GoodsName -- 折扣 if price == 0 then