Merge branch 'master_develop' of http://60.1.1.230/gaoxin/JL_Client into master_develop
commit
f17e4e319a
|
@ -126,9 +126,9 @@ function this.OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择
|
|||
Util.GetGameObject(go.transform, "proIcon"):GetComponent("Image").sprite = Util.LoadSprite(GetProStrImageByProNum(heroData.heroConfig.PropertyName))
|
||||
local formationMask = Util.GetGameObject(go.transform, "formationMask")
|
||||
-- formationMask:SetActive(false)
|
||||
formationMask:SetActive( #heroData.formationList ~= 0 or heroData.lockState == 1)
|
||||
Util.GetGameObject(formationMask.transform, "formationImage"):SetActive(heroData.formationList ~= 0 )
|
||||
Util.GetGameObject(formationMask.transform, "lockImage"):SetActive( heroData.lockState == 1)
|
||||
formationMask:SetActive(false)-- LengthOfTable(heroData.formationList) ~= 0 or heroData.lockState == 1)
|
||||
Util.GetGameObject(formationMask.transform, "formationImage"):SetActive(false)--(LengthOfTable(heroData.formationList) ~= 0 )
|
||||
Util.GetGameObject(formationMask.transform, "lockImage"):SetActive(false)--( heroData.lockState == 1)
|
||||
Util.GetGameObject(go.transform, "noumenon"):SetActive( heroData.id == curHeroData.id )
|
||||
local starGrid = Util.GetGameObject(go.transform, "star")
|
||||
SetHeroStars(starGrid, heroData.star,1,nil,nil,Vector2.New(0,1))
|
||||
|
@ -148,34 +148,34 @@ function this.OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择
|
|||
choosed:SetActive(true)
|
||||
this.numText.text=string.format("%s/%s",LengthOfTable(curSelectHeroList),curNeedRoleNum)
|
||||
end)
|
||||
Util.AddOnceClick(formationMask, function()
|
||||
if #heroData.formationList ~= 0 then
|
||||
local text = ""
|
||||
for index, value in ipairs(heroData.formationList) do
|
||||
text = HeroManager.GetHeroFormationStr(index)
|
||||
end
|
||||
PopupTipPanel.ShowTip(text)
|
||||
return
|
||||
end
|
||||
if heroData.lockState == 1 then
|
||||
PopupTipPanel.ShowTip(Language[11776])
|
||||
return
|
||||
end
|
||||
end)
|
||||
-- Util.AddOnceClick(formationMask, function()
|
||||
-- if #heroData.formationList ~= 0 then
|
||||
-- local text = ""
|
||||
-- for index, value in ipairs(heroData.formationList) do
|
||||
-- text = HeroManager.GetHeroFormationStr(index)
|
||||
-- end
|
||||
-- PopupTipPanel.ShowTip(text)
|
||||
-- return
|
||||
-- end
|
||||
-- if heroData.lockState == 1 then
|
||||
-- PopupTipPanel.ShowTip(Language[11776])
|
||||
-- return
|
||||
-- end
|
||||
-- end)
|
||||
end
|
||||
function this.HeroSortData(heroData)
|
||||
Log("#heroData "..#heroData)
|
||||
-- Log("#heroData "..#heroData)
|
||||
--Language[11108]
|
||||
table.sort(heroData, function(a, b)
|
||||
if (a.isFormation == "" or (a.isFormation ~= "" and a.isFormation == Language[11108])) and (b.isFormation == "" or (b.isFormation ~= "" and b.isFormation == Language[11108]))
|
||||
or (a.isFormation ~= "" and a.isFormation ~= Language[11108]) and (b.isFormation ~= "" and b.isFormation ~= Language[11108]) then
|
||||
if (LengthOfTable( a.formationList) == 0 and LengthOfTable( b.formationList) == 0)
|
||||
or (LengthOfTable(a.formationList) > 0) and (LengthOfTable(b.formationList) > 0) then
|
||||
if a.lockState == b.lockState then
|
||||
if a.heroConfig.Star == b.heroConfig.Star then
|
||||
if a.lv == b.lv then
|
||||
if a.id ~= curHeroData.id and b.id ~= curHeroData.id or a.id == curHeroData.id and b.id == curHeroData.id then
|
||||
if a.id ~= curHeroData.Id and b.id ~= curHeroData.Id or a.id == curHeroData.Id and b.id == curHeroData.Id then
|
||||
return a.id > b.id
|
||||
else
|
||||
return not a.id ~= curHeroData.id and b.id == curHeroData.id
|
||||
return not a.id ~= curHeroData.Id and b.id == curHeroData.Id
|
||||
end
|
||||
else
|
||||
return a.lv < b.lv
|
||||
|
@ -187,14 +187,14 @@ function this.HeroSortData(heroData)
|
|||
return a.lockState < b.lockState
|
||||
end
|
||||
else
|
||||
return (a.isFormation == "" or (a.isFormation ~= "" and a.isFormation == Language[11108])) and (not b.dynamicId ~= "" and b.isFormation ~= Language[11108])
|
||||
return LengthOfTable( a.formationList) == 0 and LengthOfTable(b.formationList) > 0
|
||||
end
|
||||
end)
|
||||
end
|
||||
function CompoundHeroFirstUpStarListPanel:AutoSelectHero()
|
||||
curSelectHeroList = {}
|
||||
for i = 1, #heroDataList do
|
||||
if LengthOfTable(curSelectHeroList) < curNeedRoleNum and heroDataList[i].formationList == 0 and heroDataList[i].lockState == 0 then--
|
||||
if LengthOfTable(curSelectHeroList) < curNeedRoleNum and LengthOfTable(heroDataList[i].formationList) == 0 and heroDataList[i].lockState == 0 then--
|
||||
curSelectHeroList[heroDataList[i].dynamicId]=heroDataList[i]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -178,11 +178,11 @@ function this.OnShowSingleCardData(go,heroData)--isSelect 1选择 2 没选择
|
|||
end)
|
||||
end
|
||||
function this.HeroSortData(heroData)
|
||||
Log("#heroData "..#heroData)
|
||||
-- Log("#heroData "..#heroData)
|
||||
--Language[11108]
|
||||
table.sort(heroData, function(a, b)
|
||||
if (a.isFormation == "" or (a.isFormation ~= "" and a.isFormation == Language[11108])) and (b.isFormation == "" or (b.isFormation ~= "" and b.isFormation == Language[11108]))
|
||||
or (a.isFormation ~= "" and a.isFormation ~= Language[11108]) and (b.isFormation ~= "" and b.isFormation ~= Language[11108]) then
|
||||
if (LengthOfTable( a.formationList) == 0 and LengthOfTable( b.formationList) == 0)
|
||||
or (LengthOfTable(a.formationList) > 0) and (LengthOfTable(b.formationList) > 0) then
|
||||
if a.lockState == b.lockState then
|
||||
if a.heroConfig.Star == b.heroConfig.Star then
|
||||
if a.lv == b.lv then
|
||||
|
@ -201,7 +201,7 @@ function this.HeroSortData(heroData)
|
|||
return a.lockState < b.lockState
|
||||
end
|
||||
else
|
||||
return (a.isFormation == "" or (a.isFormation ~= "" and a.isFormation == Language[11108])) and (not b.dynamicId ~= "" and b.isFormation ~= Language[11108])
|
||||
return LengthOfTable( a.formationList) == 0 and LengthOfTable(b.formationList) > 0
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
|
|
@ -308,7 +308,7 @@ function this.UpdateUpStarPosHeroData(curSelectHeroList,_upStarData,go)
|
|||
else
|
||||
upStarMaterialIsAll[upStarData[2]]=1
|
||||
Util.GetGameObject(curGo.transform,"add/add"):SetActive(false)
|
||||
Util.GetGameObject(curGo.transform,"num"):GetComponent("Text").text=string.format("<color=#FFFFFFFF>%s/%s</color>", LengthOfTable(curSelectHeroList),upStarData[4])
|
||||
Util.GetGameObject(curGo.transform,"num"):GetComponent("Text").text=string.format("<color=#00FF06>%s/%s</color>", LengthOfTable(curSelectHeroList),upStarData[4])
|
||||
end
|
||||
local curUpStarConsumeMaterial={}
|
||||
for i, v in pairs(curSelectHeroList) do
|
||||
|
@ -345,7 +345,7 @@ function this.UpdateUpStarPosHeroData2(curSelectHeroList)
|
|||
local _curUpStarData = this.GetAllHeroCompoundData2(curSelectHeroConfig.config,curSelectHeroConfig,true)
|
||||
if curSelectHero then this.UpdateHeroUpStarData(_curUpStarData) end
|
||||
Util.GetGameObject(curSelectUpStarGo.transform,"add/add"):SetActive(false)
|
||||
Util.GetGameObject(curSelectUpStarGo.transform,"num"):GetComponent("Text").text=string.format("<color=#FFFFFFFF>%s/%s</color>", LengthOfTable(curSelectHeroList),1)
|
||||
Util.GetGameObject(curSelectUpStarGo.transform,"num"):GetComponent("Text").text=string.format("<color=#00FF06>%s/%s</color>", LengthOfTable(curSelectHeroList),1)
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -372,7 +372,7 @@ function this.UpdateFirstHeroUpStarData(curHeroCompoundData)
|
|||
proImage:GetComponent("Image").sprite=Util.LoadSprite(GetProStrImageByProNum(heroConfig.PropertyName))
|
||||
SetHeroStars(starGrid, heroConfig.Star,1,nil,-15.3)
|
||||
if curSelectHero and curSelectHero.heroConfig then
|
||||
num:GetComponent("Text").text=string.format("<color=#FFFFFF>%s/%s</color>",1,1)
|
||||
num:GetComponent("Text").text=string.format("<color=#00FF06>%s/%s</color>",1,1)
|
||||
else
|
||||
num:GetComponent("Text").text=string.format("<color=#FF0000FF>%s/%s</color>",0,1)
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue