上阵界面排序修改

dev_chengFeng
wangzhenxing 2021-10-12 10:03:20 +08:00
parent d8a0a0e8c1
commit 2f31f6c588
2 changed files with 19 additions and 10 deletions

View File

@ -362,6 +362,9 @@ function this.GetHeroList(proId)
else
currHeros=HeroManager.GetHeroDataByProperty(proId)
end
table.sort(currHeros,function(a,b)
return this.root.NaturalSort(true,a,b)
end)
local currIndex=this.GetFormationIndex()
for i = 1,#currHeros do
local hero = currHeros[i]

View File

@ -185,17 +185,23 @@ end
--刷新战斗消耗信息
function this.RefreshBattleCastInfo()
local leftTimes = WorldArenaManager.GetFreeTime()
this.btnText.gameObject:SetActive(leftTimes > 0)
this.btnItem.gameObject:SetActive(leftTimes<=0)
this.btnItemNum.gameObject:SetActive(leftTimes<=0)
if leftTimes<=0 then
local itemId, needNum = WorldArenaManager.GetArenaChallengeCost()
local haveNum = BagManager.GetItemCountById(itemId)
this.btnItem.sprite = SetIcon(this.spLoader, itemId)
this.btnItemNum.text = "×"..needNum
this.btnItemNum.color = haveNum < needNum and UIColor.NOT_ENOUGH_RED or UIColor.BTN_TEXT
if type==1 then
local leftTimes = WorldArenaManager.GetFreeTime()
this.btnText.gameObject:SetActive(leftTimes > 0)
this.btnItem.gameObject:SetActive(leftTimes<=0)
this.btnItemNum.gameObject:SetActive(leftTimes<=0)
if leftTimes<=0 then
local itemId, needNum = WorldArenaManager.GetArenaChallengeCost()
local haveNum = BagManager.GetItemCountById(itemId)
this.btnItem.sprite = SetIcon(this.spLoader, itemId)
this.btnItemNum.text = "×"..needNum
this.btnItemNum.color = haveNum < needNum and UIColor.NOT_ENOUGH_RED or UIColor.BTN_TEXT
end
else
this.btnText.gameObject:SetActive(true)
this.btnItem.gameObject:SetActive(false)
end
end
function WorldArenaBattleInfoPanel:PlayFightAnim(leftList, rightList, num, func)