元—>$的替换
parent
29457a4ea0
commit
6f6758bf14
|
@ -1,8 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: f8caebb1f24cd114ebc6fd41468c2df2
|
|
||||||
folderAsset: yes
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName: lz4/atlas/treasureofheaven
|
|
||||||
assetBundleVariant: unity3d
|
|
|
@ -50,8 +50,8 @@ end
|
||||||
|
|
||||||
-- 获取货币单位名称
|
-- 获取货币单位名称
|
||||||
local _t2n = {
|
local _t2n = {
|
||||||
[1] = "元",
|
[1] = "%s元",
|
||||||
[2] = "美元",
|
[2] = "$%s",
|
||||||
}
|
}
|
||||||
function this.GetMoneyUnitName(mt)
|
function this.GetMoneyUnitName(mt)
|
||||||
if not mt then
|
if not mt then
|
||||||
|
|
|
@ -109,7 +109,7 @@ function this.SingleDataShow(pre,value)
|
||||||
local shows = shopItemData.RewardShow
|
local shows = shopItemData.RewardShow
|
||||||
buyInfo:GetComponent("Text").text =Language[11454].. shopItemData.Limit-boughtNum.."/".. shopItemData.Limit..Language[10054] ..")"
|
buyInfo:GetComponent("Text").text =Language[11454].. shopItemData.Limit-boughtNum.."/".. shopItemData.Limit..Language[10054] ..")"
|
||||||
if shopItemData.Limit - boughtNum > 0 then
|
if shopItemData.Limit - boughtNum > 0 then
|
||||||
price.text = shopItemData.Price..MoneyUtil.GetMoneyUnitName()
|
price.text = string.format(MoneyUtil.GetMoneyUnitName(), shopItemData.Price)--shopItemData.Price..MoneyUtil.GetMoneyUnitName()
|
||||||
btnBuy:GetComponent("Button").enabled = true
|
btnBuy:GetComponent("Button").enabled = true
|
||||||
Util.SetGray(btnBuy, false)
|
Util.SetGray(btnBuy, false)
|
||||||
else
|
else
|
||||||
|
|
|
@ -108,7 +108,7 @@ function this.SingleDataShow(pre,value)
|
||||||
local shows = shopItemData.RewardShow
|
local shows = shopItemData.RewardShow
|
||||||
buyInfo:GetComponent("Text").text =Language[11454].. shopItemData.Limit-boughtNum.."/".. shopItemData.Limit..Language[10054] ..")"
|
buyInfo:GetComponent("Text").text =Language[11454].. shopItemData.Limit-boughtNum.."/".. shopItemData.Limit..Language[10054] ..")"
|
||||||
if shopItemData.Limit - boughtNum > 0 then
|
if shopItemData.Limit - boughtNum > 0 then
|
||||||
price.text = shopItemData.Price..MoneyUtil.GetMoneyUnitName()
|
price.text = string.format(MoneyUtil.GetMoneyUnitName(), shopItemData.Price)--shopItemData.Price..MoneyUtil.GetMoneyUnitName()
|
||||||
btnBuy:GetComponent("Button").enabled = true
|
btnBuy:GetComponent("Button").enabled = true
|
||||||
Util.SetGray(btnBuy, false)
|
Util.SetGray(btnBuy, false)
|
||||||
else
|
else
|
||||||
|
|
|
@ -87,13 +87,13 @@ function this.SingleDataShow(go, data)
|
||||||
LimitText.text = shopItemData.Limit
|
LimitText.text = shopItemData.Limit
|
||||||
buyInfo:SetActive( shopItemData.IsDiscount ~= 0 )
|
buyInfo:SetActive( shopItemData.IsDiscount ~= 0 )
|
||||||
if shopItemData.IsDiscount and shopItemData.IsDiscount > 0 then
|
if shopItemData.IsDiscount and shopItemData.IsDiscount > 0 then
|
||||||
buyInfo:GetComponent("Text").text = Language[10537]..shopItemData.Price / (shopItemData.IsDiscount/10)..MoneyUtil.GetMoneyUnitName()
|
buyInfo:GetComponent("Text").text = Language[10537]..string.format(MoneyUtil.GetMoneyUnitName(), shopItemData.Price / (shopItemData.IsDiscount/10))--shopItemData.Price / (shopItemData.IsDiscount/10)..MoneyUtil.GetMoneyUnitName()
|
||||||
end
|
end
|
||||||
if goodData then
|
if goodData then
|
||||||
endTime = goodData.endTime
|
endTime = goodData.endTime
|
||||||
end
|
end
|
||||||
if shopItemData.Limit - boughtNum > 0 then
|
if shopItemData.Limit - boughtNum > 0 then
|
||||||
price.text = shopItemData.Price..MoneyUtil.GetMoneyUnitName()
|
price.text = string.format(MoneyUtil.GetMoneyUnitName(), shopItemData.Price)--..MoneyUtil.GetMoneyUnitName()
|
||||||
btnBuy:GetComponent("Button").enabled = true
|
btnBuy:GetComponent("Button").enabled = true
|
||||||
Util.SetGray(btnBuy, false)
|
Util.SetGray(btnBuy, false)
|
||||||
else
|
else
|
||||||
|
|
|
@ -198,7 +198,7 @@ function HeroStarFeedPage:SetGfitShow()
|
||||||
_ItemViewList[i].gameObject:SetActive(true)
|
_ItemViewList[i].gameObject:SetActive(true)
|
||||||
end
|
end
|
||||||
self.times.text = Language[10535]..curGiftList[curIndex].dynamicBuyTimes..Language[10054]
|
self.times.text = Language[10535]..curGiftList[curIndex].dynamicBuyTimes..Language[10054]
|
||||||
self.price.text = RechargeConfig[curGiftId].Price..MoneyUtil.GetMoneyUnitName()
|
self.price.text = string.format(MoneyUtil.GetMoneyUnitName(), RechargeConfig[curGiftId].Price)--..MoneyUtil.GetMoneyUnitName()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ function this.SetShow(root,data)
|
||||||
stateBtn:GetComponent("Button").interactable=data.server.buyTimes< data.native.Limit
|
stateBtn:GetComponent("Button").interactable=data.server.buyTimes< data.native.Limit
|
||||||
if data.server.buyTimes< data.native.Limit then--未购买
|
if data.server.buyTimes< data.native.Limit then--未购买
|
||||||
stateBtnImage.sprite=Util.LoadSprite(StateImageName[1])
|
stateBtnImage.sprite=Util.LoadSprite(StateImageName[1])
|
||||||
stateBtnText.text=data.native.Price..MoneyUtil.GetMoneyUnitName()
|
stateBtnText.text=string.format(MoneyUtil.GetMoneyUnitName(), data.native.Price)--..MoneyUtil.GetMoneyUnitName()
|
||||||
else
|
else
|
||||||
Util.SetGray(stateBtn,true)
|
Util.SetGray(stateBtn,true)
|
||||||
stateBtnText.text=Language[10638]
|
stateBtnText.text=Language[10638]
|
||||||
|
|
|
@ -48,8 +48,8 @@ function this.OnShowPanelData()
|
||||||
conFigData = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,ids[1] )
|
conFigData = ConfigManager.GetConfigData(ConfigName.RechargeCommodityConfig,ids[1] )
|
||||||
shopItemData = OperatingManager.GetGiftGoodsInfo(conFigData.Type,conFigData.Id)
|
shopItemData = OperatingManager.GetGiftGoodsInfo(conFigData.Type,conFigData.Id)
|
||||||
if shopItemData == nil then return end
|
if shopItemData == nil then return end
|
||||||
this.oldPurchaseText.text = Language[10537]..conFigData.Price/(conFigData.IsDiscount/10)..MoneyUtil.GetMoneyUnitName()
|
this.oldPurchaseText.text = Language[10537]..string.format(MoneyUtil.GetMoneyUnitName(), conFigData.Price/(conFigData.IsDiscount/10))--..MoneyUtil.GetMoneyUnitName()
|
||||||
this.curPurchaseText.text = Language[10640]..conFigData.Price..MoneyUtil.GetMoneyUnitName()
|
this.curPurchaseText.text = Language[10640]..string.format(MoneyUtil.GetMoneyUnitName(), conFigData.Price)--..MoneyUtil.GetMoneyUnitName()
|
||||||
this.buyNumText.text = Language[10556]..shopItemData.buyTimes.."/"..conFigData.Limit
|
this.buyNumText.text = Language[10556]..shopItemData.buyTimes.."/"..conFigData.Limit
|
||||||
if shopItemData.buyTimes <= 0 then
|
if shopItemData.buyTimes <= 0 then
|
||||||
this.buyText.text = Language[10641]
|
this.buyText.text = Language[10641]
|
||||||
|
|
|
@ -60,11 +60,11 @@ function this.OnShowPanelData(i)
|
||||||
local itemRewardParent=Util.GetGameObject(preGrid[i],"itemRewardParent")
|
local itemRewardParent=Util.GetGameObject(preGrid[i],"itemRewardParent")
|
||||||
local buyBtn=Util.GetGameObject(preGrid[i],"BuyBtn")
|
local buyBtn=Util.GetGameObject(preGrid[i],"BuyBtn")
|
||||||
local buyNumText=Util.GetGameObject(preGrid[i],"buyNumText"):GetComponent("Text")
|
local buyNumText=Util.GetGameObject(preGrid[i],"buyNumText"):GetComponent("Text")
|
||||||
oldPurchaseText.text = Language[10643]..conFigData.Price/(conFigData.IsDiscount/10)..MoneyUtil.GetMoneyUnitName()
|
oldPurchaseText.text = Language[10643]..string.format(MoneyUtil.GetMoneyUnitName(), conFigData.Price/(conFigData.IsDiscount/10))--..MoneyUtil.GetMoneyUnitName()
|
||||||
buyNumText.text = Language[10556]..shopItemData.buyTimes.."/"..conFigData.Limit
|
buyNumText.text = Language[10556]..shopItemData.buyTimes.."/"..conFigData.Limit
|
||||||
-- Log("购买次数 "..shopItemData.buyTimes)
|
-- Log("购买次数 "..shopItemData.buyTimes)
|
||||||
if shopItemData.buyTimes <= 0 then
|
if shopItemData.buyTimes <= 0 then
|
||||||
curPurchaseText.text = conFigData.Price..MoneyUtil.GetMoneyUnitName()
|
curPurchaseText.text = string.format(MoneyUtil.GetMoneyUnitName(), conFigData.Price)--..MoneyUtil.GetMoneyUnitName()
|
||||||
buyBtn:GetComponent("Button").enabled = true
|
buyBtn:GetComponent("Button").enabled = true
|
||||||
Util.SetGray(buyBtn, false)
|
Util.SetGray(buyBtn, false)
|
||||||
else
|
else
|
||||||
|
|
|
@ -218,7 +218,8 @@ function UpperMonthCard:SetBuyState()
|
||||||
self.boughtPanel:SetActive(isBought)
|
self.boughtPanel:SetActive(isBought)
|
||||||
self.buyPanel:SetActive(not isBought)
|
self.buyPanel:SetActive(not isBought)
|
||||||
Util.SetGray(self.btnBuy, not isActive)
|
Util.SetGray(self.btnBuy, not isActive)
|
||||||
self.textBuy.text = isActive and self.panelType .. MoneyUtil.GetMoneyUnitName() or self.panelType .. MoneyUtil.GetMoneyUnitName()
|
-- self.textBuy.text = isActive and (self.panelType .. MoneyUtil.GetMoneyUnitName()) or (self.panelType .. MoneyUtil.GetMoneyUnitName())
|
||||||
|
self.textBuy.text = isActive and (string.format(MoneyUtil.GetMoneyUnitName(),self.panelType)) or (string.format(MoneyUtil.GetMoneyUnitName(),self.panelType))-- .. MoneyUtil.GetMoneyUnitName())
|
||||||
|
|
||||||
if not isBought then
|
if not isBought then
|
||||||
self:SetBuyPanelInfo()
|
self:SetBuyPanelInfo()
|
||||||
|
|
|
@ -146,7 +146,7 @@ function WeekMonthGiftPackPage:RefreshShowData(item, data)
|
||||||
Util.SetGray(btnBuy,not isCanBuy)
|
Util.SetGray(btnBuy,not isCanBuy)
|
||||||
icon:GetComponent("Image").enabled=isCanBuy
|
icon:GetComponent("Image").enabled=isCanBuy
|
||||||
if isCanBuy then
|
if isCanBuy then
|
||||||
price.text = finalNum..MoneyUtil.GetMoneyUnitName()
|
price.text = string.format(MoneyUtil.GetMoneyUnitName(), finalNum)--..MoneyUtil.GetMoneyUnitName()
|
||||||
buyInfo.text = Language[11454]..limitNum - boughtNum .. "/" .. limitNum..Language[11455] --limitNum == -1 and "" or limitNum - boughtNum .. "/" .. limitNum
|
buyInfo.text = Language[11454]..limitNum - boughtNum .. "/" .. limitNum..Language[11455] --limitNum == -1 and "" or limitNum - boughtNum .. "/" .. limitNum
|
||||||
else
|
else
|
||||||
price.alignment="MiddleCenter"
|
price.alignment="MiddleCenter"
|
||||||
|
|
|
@ -505,7 +505,7 @@ function GiftView:RefreshShowData(item, data, buyType, DataTypeIndex)
|
||||||
-- end
|
-- end
|
||||||
price.alignment = "MiddleCenter"
|
price.alignment = "MiddleCenter"
|
||||||
icon:SetActive(false)
|
icon:SetActive(false)
|
||||||
price.text = finalNum..MoneyUtil.GetMoneyUnitName()--..str
|
price.text = string.format(MoneyUtil.GetMoneyUnitName(), finalNum)
|
||||||
end
|
end
|
||||||
buyInfo.text = Language[11454]..limitNum - boughtNum .. "/" .. limitNum..Language[11455] --limitNum == -1 and "" or limitNum - boughtNum .. "/" .. limitNum
|
buyInfo.text = Language[11454]..limitNum - boughtNum .. "/" .. limitNum..Language[11455] --limitNum == -1 and "" or limitNum - boughtNum .. "/" .. limitNum
|
||||||
else
|
else
|
||||||
|
|
|
@ -280,7 +280,7 @@ function TreasureOfSomebodyRewardPageV2:InitUnlockCost()
|
||||||
if not TreasureOfSomebodyManagerV2.hadBuyTreasure then
|
if not TreasureOfSomebodyManagerV2.hadBuyTreasure then
|
||||||
local gameSettingConfig = ConfigManager.GetConfigData(ConfigName.GameSetting, 1)
|
local gameSettingConfig = ConfigManager.GetConfigData(ConfigName.GameSetting, 1)
|
||||||
-- self.unlockCostIcon.sprite = SetIcon(gameSettingConfig.TreasurePrice[1])
|
-- self.unlockCostIcon.sprite = SetIcon(gameSettingConfig.TreasurePrice[1])
|
||||||
self.unlockCostValue.text = gameSettingConfig.TreasurePrice[2]..MoneyUtil.GetMoneyUnitName()
|
self.unlockCostValue.text = string.format(MoneyUtil.GetMoneyUnitName(), gameSettingConfig.TreasurePrice[2])--..MoneyUtil.GetMoneyUnitName()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -140,7 +140,7 @@ function UnlockExtraRewardPanel:SetCostValues()
|
||||||
local gameSettingConfig = ConfigManager.GetConfigData(ConfigName.GameSetting, 1)
|
local gameSettingConfig = ConfigManager.GetConfigData(ConfigName.GameSetting, 1)
|
||||||
local propId = gameSettingConfig.TreasurePrice[1]
|
local propId = gameSettingConfig.TreasurePrice[1]
|
||||||
-- self.costIcon.sprite = SetIcon(propId)
|
-- self.costIcon.sprite = SetIcon(propId)
|
||||||
self.costValue.text = gameSettingConfig.TreasurePrice[2]..MoneyUtil.GetMoneyUnitName()
|
self.costValue.text = string.format(MoneyUtil.GetMoneyUnitName(), gameSettingConfig.TreasurePrice[2])--..MoneyUtil.GetMoneyUnitName()
|
||||||
self.enoughStatus = BagManager.GetItemCountById(propId) >= gameSettingConfig.TreasurePrice[2]
|
self.enoughStatus = BagManager.GetItemCountById(propId) >= gameSettingConfig.TreasurePrice[2]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ function this:SetGfitShow(rechargeData)
|
||||||
_ItemViewList[i].gameObject:SetActive(true)
|
_ItemViewList[i].gameObject:SetActive(true)
|
||||||
end
|
end
|
||||||
this.times.text = Language[10535]..rechargeData.dynamicBuyTimes..Language[10054]
|
this.times.text = Language[10535]..rechargeData.dynamicBuyTimes..Language[10054]
|
||||||
this.price.text = RechargeConfig[curGiftId].Price..MoneyUtil.GetMoneyUnitName()
|
this.price.text = string.format(MoneyUtil.GetMoneyUnitName(), RechargeConfig[curGiftId].Price)--..MoneyUtil.GetMoneyUnitName()
|
||||||
--this.oriPrice.gameObject:SetActive(activityType[curType].price)
|
--this.oriPrice.gameObject:SetActive(activityType[curType].price)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue