TCX_LongZhu
parent
3c3979199f
commit
1501b7f4f0
|
|
@ -122,6 +122,9 @@ function PracticeImprint:SetSingleImprint(_go,_data)
|
|||
local name = Util.GetGameObject(_go, "name/Text"):GetComponent("Text")
|
||||
local selectImg = Util.GetGameObject(_go, "select")
|
||||
local redPoint = Util.GetGameObject(_go, "redPoint")
|
||||
local suoBG = Util.GetGameObject(_go.transform.parent.parent, "suoBG")
|
||||
local suoBGText = Util.GetGameObject(_go.transform.parent.parent, "suoBG/title"):GetComponent("Text")
|
||||
suoBGText.text = ""
|
||||
selectImg:SetActive(false)
|
||||
redPoint:SetActive(false)
|
||||
self.SelectList[_imprintId] = selectImg
|
||||
|
|
@ -132,6 +135,12 @@ function PracticeImprint:SetSingleImprint(_go,_data)
|
|||
maskBlack:SetActive(true)
|
||||
Util.SetGray(icon.gameObject,true)
|
||||
Util.SetGray(kuang,true)
|
||||
for i = 1, #configData.OpenSkillSet do
|
||||
local data = configData.OpenSkillSet[i]
|
||||
local itemConfig = ConfigManager.GetConfigDataByKey(ConfigName.ItemConfig,"Id",configData.OpenSkillSet[i][1])
|
||||
suoBGText.text = "收集"..itemConfig.Name..data[2].."个后开启\n"
|
||||
end
|
||||
|
||||
else--已解锁
|
||||
maskBlack:SetActive(false)
|
||||
if PlayerPrefs.GetInt(PlayerManager.uid.."Imprint"..configData.Id) == 0 then
|
||||
|
|
@ -153,6 +162,32 @@ function PracticeImprint:SetSingleImprint(_go,_data)
|
|||
end
|
||||
icon.sprite = self.spLoader:LoadSprite(GetResourcePath(configData.Icon))
|
||||
name.text = configData.Name
|
||||
local heroContion = Util.GetGameObject(_go,"needsList")
|
||||
if configData.OpenType == 1 then
|
||||
heroContion:SetActive(true)
|
||||
for i=1, #configData.OpenValue do
|
||||
local t = Util.GetGameObject(_go,"needsList/pre"..tostring(i).."/head"):GetComponent("Image")
|
||||
local condition = Util.GetGameObject(_go,"needsList/pre"..tostring(i).."/Text"):GetComponent("Text")
|
||||
local heroConfig = ConfigManager.GetConfigDataByKey(ConfigName.HeroConfig,"Id",configData.OpenValue[i][1])
|
||||
t.sprite=self.spLoader:LoadSprite(GetResourcePath(heroConfig.Icon))
|
||||
if configData.OpenValue[i][2] > 10 then
|
||||
condition.text = "飞升" .. (configData.OpenValue[i][2]-10)
|
||||
else
|
||||
condition.text = configData.OpenValue[i][2] .."星"
|
||||
end
|
||||
end
|
||||
elseif configData.OpenType == 2 then
|
||||
heroContion:SetActive(true)
|
||||
for i=1, #configData.OpenValue do
|
||||
local t = Util.GetGameObject(_go,"needsList/pre"..tostring(i).."/head"):GetComponent("Image")
|
||||
local condition = Util.GetGameObject(_go,"needsList/pre"..tostring(i).."/Text"):GetComponent("Text")
|
||||
local itemConfig = ConfigManager.GetConfigDataByKey(ConfigName.ItemConfig,"Id",configData.OpenValue[i][1])
|
||||
t.sprite=self.spLoader:LoadSprite(GetResourcePath(itemConfig.ResourceID))
|
||||
condition.text = configData.OpenValue[i][2].."级"
|
||||
end
|
||||
else
|
||||
heroContion:SetActive(false)
|
||||
end
|
||||
|
||||
Util.AddOnceClick(maskBtn,function ()
|
||||
--未解锁的不可查看
|
||||
|
|
|
|||
Loading…
Reference in New Issue