每日挑战
This commit is contained in:
parent
a6245691d7
commit
ed7bb362f0
@ -8,10 +8,20 @@ function TaskCell:refresh(taskInfo, customProgress)
|
||||
customProgress = customProgress or 0
|
||||
local uiMap = self:getUIMap()
|
||||
local icon = complete and ICON_BG[2] or ICON_BG[1]
|
||||
uiMap["task_cell.task_icon_bg"]:setSprite(GConst.ATLAS_PATH.COMMON, icon)
|
||||
icon = complete and ICON[2] or ICON[1]
|
||||
uiMap["task_cell.task_icon"]:setSprite(GConst.ATLAS_PATH.DAILY_CHALLENGE, icon)
|
||||
-- uiMap["task_cell.task_icon_bg"]:setSprite(GConst.ATLAS_PATH.COMMON, icon)
|
||||
-- icon = complete and ICON[2] or ICON[1]
|
||||
-- uiMap["task_cell.task_icon"]:setSprite(GConst.ATLAS_PATH.DAILY_CHALLENGE, icon)
|
||||
uiMap["task_cell.desc"]:setText(DataManager.DailyChallengeData:getTaskDesc(taskInfo.task_id, true, customProgress))
|
||||
|
||||
for i = 1, 3 do
|
||||
local cell = uiMap["daily_challenge_task_ui.bg.task_cell_" .. i]
|
||||
if taskInfo.reward[i] then
|
||||
cell:setVisible(true)
|
||||
cell:refresh(taskInfo.reward[i])
|
||||
else
|
||||
cell:setVisible(false)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return TaskCell
|
||||
@ -30,18 +30,18 @@ function DailyChallengeUI:onLoadRootComplete()
|
||||
uiMap["daily_challenge_ui.close_btn"]:addClickListener(function ()
|
||||
self:closeUI()
|
||||
end)
|
||||
uiMap["daily_challenge_ui.challenge.info.title.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE))
|
||||
uiMap["daily_challenge_ui.challenge.info.record_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.CHAPTER_DESC_1, DataManager.DailyChallengeData:getMaxWave()))
|
||||
uiMap["daily_challenge_ui.title.title_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.DAILY_CHALLENGE))
|
||||
uiMap["daily_challenge_ui.record_tx"]:setText(I18N:getGlobalText(I18N.GlobalConst.CHAPTER_DESC_1, DataManager.DailyChallengeData:getMaxWave()))
|
||||
|
||||
self.tasks = GFunc.getTable()
|
||||
table.insert(self.tasks, uiMap["daily_challenge_ui.challenge.task.icon_task1"])
|
||||
table.insert(self.tasks, uiMap["daily_challenge_ui.challenge.task.icon_task2"])
|
||||
table.insert(self.tasks, uiMap["daily_challenge_ui.challenge.task.icon_task3"])
|
||||
table.insert(self.tasks, uiMap["daily_challenge_ui.task.icon_task1"])
|
||||
table.insert(self.tasks, uiMap["daily_challenge_ui.task.icon_task2"])
|
||||
table.insert(self.tasks, uiMap["daily_challenge_ui.task.icon_task3"])
|
||||
|
||||
self.buffObj = uiMap["daily_challenge_ui.challenge.buffs.buff.btn_buff"]
|
||||
self.debuffObj = uiMap["daily_challenge_ui.challenge.buffs.debuff.btn_debuff"]
|
||||
self.bossSpine = uiMap["daily_challenge_ui.challenge.spine_node"]
|
||||
self.countdownTx = uiMap["daily_challenge_ui.challenge.info.countdown.time_tx"]
|
||||
self.buffObj = uiMap["daily_challenge_ui.buffs.buff.btn_buff"]
|
||||
self.debuffObj = uiMap["daily_challenge_ui.buffs.debuff.btn_debuff"]
|
||||
self.bossSpine = uiMap["daily_challenge_ui.spine_node"]
|
||||
self.countdownTx = uiMap["daily_challenge_ui.countdown.time_tx"]
|
||||
|
||||
self.fightBtn = uiMap["daily_challenge_ui.fight_btn"]
|
||||
-- 体力消耗
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user