【合成内容优化】

dev_chengFeng
guowei 2020-12-22 19:55:39 +08:00
parent e6963e85d9
commit 49af5efcdb
5 changed files with 64 additions and 16 deletions

View File

@ -281,6 +281,7 @@ function this.OnShowLayout3Data()
this.chipFrame:SetActive(true) this.chipFrame:SetActive(true)
this.chipFrame:GetComponent("Image").sprite = Util.LoadSprite(GetHeroChipQuantityImageByquality(itemData.itemConfig.Quantity)) this.chipFrame:GetComponent("Image").sprite = Util.LoadSprite(GetHeroChipQuantityImageByquality(itemData.itemConfig.Quantity))
if itemData.itemConfig.PropertyName and itemData.itemConfig.PropertyName > 0 then if itemData.itemConfig.PropertyName and itemData.itemConfig.PropertyName > 0 then
print(itemData.itemConfig.PropertyName,"~~~~~~S")
this.propertyIma:SetActive(true) this.propertyIma:SetActive(true)
this.propertyIma:GetComponent("Image").sprite = Util.LoadSprite(GetJobSpriteStrByJobNum(itemData.itemConfig.PropertyName)) this.propertyIma:GetComponent("Image").sprite = Util.LoadSprite(GetJobSpriteStrByJobNum(itemData.itemConfig.PropertyName))
else else
@ -306,7 +307,7 @@ function this.OnShowLayout3Data()
compoundNum=1 compoundNum=1
this.Slider:GetComponent("Slider").value=1 this.Slider:GetComponent("Slider").value=1
compoundNum= compoundNum>=compoundMaxNum and compoundMaxNum or compoundNum compoundNum= compoundNum>=compoundMaxNum and compoundMaxNum or compoundNum
Log("compoundNum "..compoundNum) Log("compoundNum "..compoundNum.." compoundMaxNum "..compoundMaxNum)
this.Slider:GetComponent("Slider").minValue=0 this.Slider:GetComponent("Slider").minValue=0
this.Slider:GetComponent("Slider").maxValue=compoundMaxNum this.Slider:GetComponent("Slider").maxValue=compoundMaxNum
--this.ShowCompoundNumData(compoundNum) --this.ShowCompoundNumData(compoundNum)

View File

@ -61,7 +61,7 @@ function this.InitData(guideData)
-- 测试功能引导用 -- 测试功能引导用
Timer.New(function() Timer.New(function()
this.OnFunctionOpen(86) this.OnFunctionOpen(78)
end, 1):Start() end, 1):Start()
end end

View File

@ -31,9 +31,9 @@ local HongmengUp = ConfigManager.GetConfig(ConfigName.HongmengUp)
function this.InitHongMengData(hongmengGuards, hongmengHeroInfos, hongmengTablet, hongmengAdditions) function this.InitHongMengData(hongmengGuards, hongmengHeroInfos, hongmengTablet, hongmengAdditions)
-- body -- body
this.hongmengGuards = hongmengGuards this.hongmengGuards = hongmengGuards
-- LogGreen(#this.hongmengGuards) LogGreen("hongmengGuards",#this.hongmengGuards)
this.hongmengHeroInfos = hongmengHeroInfos this.hongmengHeroInfos = hongmengHeroInfos
-- LogGreen(#this.hongmengHeroInfos) LogGreen("hongmengHeroInfos",#this.hongmengHeroInfos)
for i = 1, #this.hongmengGuards do for i = 1, #this.hongmengGuards do
this.hongmengGuards[i].time = this.hongmengGuards[i].time + GetTimeStamp() this.hongmengGuards[i].time = this.hongmengGuards[i].time + GetTimeStamp()
end end

View File

@ -16,8 +16,8 @@ function GongMingResultTips:InitComponent()
this.TextAll = Util.GetGameObject(self.transform,"grid/TextAll") this.TextAll = Util.GetGameObject(self.transform,"grid/TextAll")
this.contentHunText = Util.GetGameObject(self.transform,"grid/ver/recordPer (1)/name/text (3)")
this.contentLingText = Util.GetGameObject(self.transform,"grid/ver/recordPer (1)/name/text (4)")
end end
@ -48,6 +48,7 @@ function GongMingResultTips:OnOpen(skinId)
-- -- body -- -- body
-- print(key, " ",value) -- print(key, " ",value)
-- end -- end
if HarmonyManager.hongmengTablet >= 330 then if HarmonyManager.hongmengTablet >= 330 then
-- body -- body
--LogGreen(HarmonyManager.hongmengTablet) --LogGreen(HarmonyManager.hongmengTablet)
@ -70,11 +71,19 @@ function GongMingResultTips:OnOpen(skinId)
elseif data[i].additionType == 3 then elseif data[i].additionType == 3 then
if data[i].heroTid~=0 then if data[i].heroTid~=0 then
-- body -- body
this.contentLingText:SetActive(false)
Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName) Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
else else
print(" textHun ",data[i].value) print(" textHun ",data[i].value)
Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=green>%d</color>",data[i].value) if PlayerManager.level<75 then
-- body
this.contentLingText:SetActive(false)
Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = ""
else
this.contentLingText:SetActive(true)
Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=red>无</color>")
end
end end
-- body -- body
@ -82,13 +91,21 @@ function GongMingResultTips:OnOpen(skinId)
if data[i].heroTid ~= 0 then if data[i].heroTid ~= 0 then
-- body -- body
-- print(tostring(data[i].value).." "..data[i].heroTid.." ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName ") -- print(tostring(data[i].value).." "..data[i].heroTid.." ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName ")
this.contentHunText:SetActive(true)
Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text =string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName) Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text =string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
else else
print(" textLing ",data[i].value) if PlayerManager.level<75 then
Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("<color=green>%d</color>",data[i].value) -- body
this.contentHunText:SetActive(false)
Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text =""
else
this.contentHunText:SetActive(true)
Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("<color=red>无</color>")
end
end end
-- body -- body
@ -100,7 +117,6 @@ function GongMingResultTips:OnOpen(skinId)
for i = 1, #data do for i = 1, #data do
if data[i].additionType == 1 then if data[i].additionType == 1 then
Util.GetGameObject(this.TextAll,"textDegree"):GetComponent("Text").text = string.format("<color=green>%d级</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName) Util.GetGameObject(this.TextAll,"textDegree"):GetComponent("Text").text = string.format("<color=green>%d级</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
elseif data[i].additionType == 2 then elseif data[i].additionType == 2 then
@ -115,10 +131,19 @@ function GongMingResultTips:OnOpen(skinId)
elseif data[i].additionType == 3 then elseif data[i].additionType == 3 then
if data[i].heroTid~=0 then if data[i].heroTid~=0 then
-- body -- body
this.contentLingText:SetActive(true)
Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName) Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
else else
if PlayerManager.level<75 then
-- body
this.contentLingText:SetActive(false)
Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = ""
else
this.contentLingText:SetActive(true)
Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=red>无</color>")
end
-- Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=green>%d</color>",data[i].value) -- Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=green>%d</color>",data[i].value)
Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=red>无</color>") --Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=red>无</color>")
end end
-- body -- body
@ -126,13 +151,20 @@ function GongMingResultTips:OnOpen(skinId)
if data[i].heroTid ~= 0 then if data[i].heroTid ~= 0 then
-- body -- body
print(tostring(data[i].value).." "..data[i].heroTid.." ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName ") print(tostring(data[i].value).." "..data[i].heroTid.." ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName ")
this.contentHunText:SetActive(true)
Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text =string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName) Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text =string.format("<color=green>%d</color>(%s)",data[i].value,ConfigManager.TryGetConfigData(ConfigName.HeroConfig, data[i].heroTid).ReadingName)
else else
if PlayerManager.level<75 then
-- body
this.contentHunText:SetActive(false)
Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = ""
else
this.contentHunText:SetActive(true)
Util.GetGameObject(this.TextAll,"textHun"):GetComponent("Text").text = string.format("<color=red>无</color>")
end
-- Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("<color=green>%d</color>",data[i].value) -- Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("<color=green>%d</color>",data[i].value)
Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("<color=red>无</color>") --Util.GetGameObject(this.TextAll,"textLing"):GetComponent("Text").text = string.format("<color=red>无</color>")
end end
-- body -- body

View File

@ -50,6 +50,21 @@ function RewardItemSingleShowPopup:BindEvent()
UIManager.OpenPanel(UIName.BagResolveAnCompoundPanel, 3, _itemData, function() UIManager.OpenPanel(UIName.BagResolveAnCompoundPanel, 3, _itemData, function()
func() func()
end) end)
-- elseif BagManager.GetItemCountById(itemSid) == BagManager.bagDatas[itemSid].itemConfig.UsePerCount then
-- -- body
-- local _itemData = BagManager.bagDatas[itemSid]
-- local item={}
-- item.itemId= _itemData.id
-- item.itemNum=compoundNum*_itemData.itemConfig.UsePerCount
-- Log("sssssssssssssss "..item.itemId.." "..item.itemNum)
-- NetManager.HeroComposeRequest(item,function (drop)
-- this.SendBackCompoundReCallBack(drop)
-- end)
-- if compoundNum>0 then
-- else
-- PopupTipPanel.ShowTip(Language[10200])
-- end
else else
PopupTipPanel.ShowTip(Language[11592]) PopupTipPanel.ShowTip(Language[11592])
end end