百寶商會
parent
98b3a0caa2
commit
2b1356db5c
|
@ -16,7 +16,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &3073281026589723369
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -34,9 +34,9 @@ RectTransform:
|
|||
m_Father: {fileID: 6886638989263466640}
|
||||
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: 54.905, y: -444.75497}
|
||||
m_SizeDelta: {x: 109.81, y: 109.93}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4700869063048308914
|
||||
|
@ -515,16 +515,16 @@ MonoBehaviour:
|
|||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 6fa15837529b0e640af6620b07d3207d, type: 3}
|
||||
m_FontSize: 14
|
||||
m_FontSize: 25
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 1
|
||||
m_MinSize: 10
|
||||
m_BestFit: 0
|
||||
m_MinSize: 2
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 5
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: New Text
|
||||
--- !u!1 &1096337136158421641
|
||||
|
@ -1010,16 +1010,16 @@ MonoBehaviour:
|
|||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 6fa15837529b0e640af6620b07d3207d, type: 3}
|
||||
m_FontSize: 14
|
||||
m_FontSize: 25
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 1
|
||||
m_MinSize: 10
|
||||
m_BestFit: 0
|
||||
m_MinSize: 2
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 5
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: New Text
|
||||
--- !u!1 &2336331734209450075
|
||||
|
@ -6400,16 +6400,16 @@ MonoBehaviour:
|
|||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 6fa15837529b0e640af6620b07d3207d, type: 3}
|
||||
m_FontSize: 14
|
||||
m_FontSize: 25
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 1
|
||||
m_MinSize: 10
|
||||
m_BestFit: 0
|
||||
m_MinSize: 2
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 5
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: New Text
|
||||
--- !u!1 &4113140305433002634
|
||||
|
@ -12557,16 +12557,16 @@ MonoBehaviour:
|
|||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 6fa15837529b0e640af6620b07d3207d, type: 3}
|
||||
m_FontSize: 14
|
||||
m_FontSize: 25
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 1
|
||||
m_MinSize: 10
|
||||
m_BestFit: 0
|
||||
m_MinSize: 2
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 5
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_VerticalOverflow: 1
|
||||
m_LineSpacing: 1
|
||||
m_Text: New Text
|
||||
--- !u!1 &8524300251712960252
|
||||
|
|
|
@ -117,13 +117,13 @@ function this.SortData(allData)
|
|||
return
|
||||
end
|
||||
table.sort(allData, function(a,b)
|
||||
local aboughtNum = a.Limit - OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, a.Id) > 0 and 2 or 1
|
||||
local bboughtNum = b.Limit - OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, b.Id) > 0 and 2 or 1
|
||||
if aboughtNum == bboughtNum then
|
||||
-- local aboughtNum = a.Limit - OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, a.Id) > 0 and 2 or 1
|
||||
-- local bboughtNum = b.Limit - OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, b.Id) > 0 and 2 or 1
|
||||
-- if aboughtNum == bboughtNum then
|
||||
return a.Id < b.Id
|
||||
else
|
||||
return aboughtNum > bboughtNum
|
||||
end
|
||||
-- else
|
||||
-- return aboughtNum > bboughtNum
|
||||
-- end
|
||||
end)
|
||||
return allData
|
||||
end
|
||||
|
@ -148,10 +148,6 @@ function this:SetScrollPre(root,data)
|
|||
itemList[i].Name = Util.GetGameObject(itemList[i].go,"Name"):GetComponent("Text")
|
||||
end
|
||||
local config = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,data.Id)
|
||||
--title.text = GetLanguageStrById(data.Name)
|
||||
LogGreen("data.Id:"..data.Id)
|
||||
LogGreen("config.Rebate:"..config.Rebate)
|
||||
LogGreen("config.Price:"..config.Price)
|
||||
title.text = string.format("价值%s现仅需%s",MoneyUtil.GetMoneyUnitNameWithMoney(config.Rebate),MoneyUtil.GetMoneyUnitNameWithMoney(config.Price))
|
||||
local rewardArray = data.RewardShow
|
||||
if not itemsGrid then
|
||||
|
@ -181,25 +177,20 @@ function this:SetScrollPre(root,data)
|
|||
else
|
||||
itemList[i].go.gameObject:SetActive(true)
|
||||
itemList[i].icon.sprite = Util.LoadSprite(GetSpriteNameByItemId(rewardArray[i][1]))
|
||||
itemList[i].Name.text = ConfigManager.GetConfigData(ConfigName.ItemConfig, rewardArray[i][1]).Name .."×" .. rewardArray[i][2]
|
||||
itemList[i].Name.text = ConfigManager.GetConfigData(ConfigName.ItemConfig, rewardArray[i][1]).Name .."\n×" .. rewardArray[i][2]
|
||||
end
|
||||
end
|
||||
|
||||
local boughtNum = OperatingManager.GetGoodsBuyTime(GoodsTypeDef.DirectPurchaseGift, data.Id) or 0
|
||||
|
||||
tip.text =Language[10580].. (data.Limit-boughtNum) ..Language[10048]
|
||||
buyNum.text =string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(data.Price))--shopItemData.Price..MoneyUtil.GetMoneyUnitName()
|
||||
if data.Limit - boughtNum > 0 then
|
||||
buyNum.text = string.format(MoneyUtil.GetMoneyUnitName(), MoneyUtil.GetMoney(data.Price))--shopItemData.Price..MoneyUtil.GetMoneyUnitName()
|
||||
buyBtn:GetComponent("Button").enabled = true
|
||||
Util.SetGray(buyBtn, false)
|
||||
tip.text =Language[10580].. (data.Limit-boughtNum) ..Language[10048]
|
||||
else
|
||||
buyNum.text = Language[10514]
|
||||
buyBtn:GetComponent("Button").enabled = false
|
||||
Util.SetGray(buyBtn, true)
|
||||
tip.text = ""
|
||||
end
|
||||
|
||||
--local costId, finalNum, oriCostNum = ShopManager.calculateBuyCost(SHOP_TYPE.FINDTREASURE_GIFT, data.id, 1)
|
||||
Util.AddOnceClick(buyBtn, function()
|
||||
if data.Limit <= boughtNum then
|
||||
PopupTipPanel.ShowTip(Language[10515])
|
||||
|
|
Loading…
Reference in New Issue