【山河社稷图】提交
parent
bcc175ea8f
commit
11f17fca87
|
@ -158,6 +158,10 @@ function this.FightLevelFightBattle(_fightLevelData, callBack)
|
|||
elseif _fightLevelData.config.StageType == FIGHTLEVEL_STAGETYPE.AssistantLevelReward then
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup,msg.drop,1,function()
|
||||
--刷新数据刷新界面
|
||||
if callBack then
|
||||
callBack()
|
||||
callBack = nil
|
||||
end
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
|
|
@ -126,6 +126,8 @@ function this.SetSingleLevel(levelDatas)
|
|||
if isOpen == 0 then
|
||||
if levelData.state == 0 then
|
||||
FightLevelManager.FightLevelFightBattle(levelData, function()
|
||||
this.OnShowPanel()
|
||||
this.LeftOrRightBtnClickEvent()
|
||||
end)
|
||||
elseif levelData.state == 1 then
|
||||
PopupTipPanel.ShowTip("奖励已领取!")
|
||||
|
@ -220,27 +222,35 @@ function this.LeftOrRightBtnClickEvent(index)
|
|||
-- chapterData = FightLevelManager.GetChapterData(chapterId)
|
||||
local upChapterId = chapterData.chapterId - 1
|
||||
local upChapterData = FightLevelManager.GetChapterData(upChapterId)
|
||||
LogYellow("upChapterId "..upChapterId.." FightLevelManager.GetCurChapterId() "..FightLevelManager.GetCurChapterId())
|
||||
if upChapterData and upChapterId <= FightLevelManager.GetCurChapterId() then
|
||||
LogYellow("this.leftBtn:SetActive(true)")
|
||||
this.leftBtn:SetActive(true)
|
||||
else
|
||||
LogYellow("this.leftBtn:SetActive(false)")
|
||||
this.leftBtn:SetActive(false)
|
||||
end
|
||||
|
||||
local downChapterId = chapterData.chapterId + 1
|
||||
local downChapterData = FightLevelManager.GetChapterData(upChapterId)
|
||||
LogYellow("downChapterId "..downChapterId.." FightLevelManager.GetCurChapterId() "..FightLevelManager.GetCurChapterId())
|
||||
local downChapterData = FightLevelManager.GetChapterData(downChapterId)
|
||||
if downChapterData and downChapterId <= FightLevelManager.GetCurChapterId() then
|
||||
this.rightBtn:SetActive(true)
|
||||
LogYellow(" this.rightBtn:SetActive(true)")
|
||||
else
|
||||
this.rightBtn:SetActive(false)
|
||||
LogYellow(" this.rightBtn:SetActive(false)")
|
||||
end
|
||||
if index and index == 1 then--左
|
||||
chapterId = upChapterId
|
||||
chapterData = upChapterData
|
||||
this.OnShowPanel()
|
||||
this.LeftOrRightBtnClickEvent()
|
||||
elseif index and index == 2 then--右
|
||||
chapterId = downChapterId
|
||||
chapterData = downChapterData
|
||||
this.OnShowPanel()
|
||||
this.LeftOrRightBtnClickEvent()
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -94,6 +94,13 @@ function this.SingleDataShow(_go,_rewardData,_index)
|
|||
Util.GetGameObject(noButton, "Text"):GetComponent("Text").text = "未达成"
|
||||
noButton:SetActive(not FightLevelManager.GetCurLevelStarState(fightLevelData.state,index))
|
||||
okButton:SetActive(FightLevelManager.GetCurLevelStarState(fightLevelData.state,index))
|
||||
if index == 0 then--首通
|
||||
noButton:SetActive(not (fightLevelData.state > 0))--state > 0 说明有星 肯定通关了就
|
||||
okButton:SetActive(fightLevelData.state > 0)
|
||||
else
|
||||
noButton:SetActive(not FightLevelManager.GetCurLevelStarState(fightLevelData.state,index))
|
||||
okButton:SetActive(FightLevelManager.GetCurLevelStarState(fightLevelData.state,index))
|
||||
end
|
||||
end
|
||||
function this.OnSortingOrderChange()
|
||||
for i, v in pairs(this.NoviceItemList) do
|
||||
|
|
Loading…
Reference in New Issue