zancun
This commit is contained in:
parent
e151b5329e
commit
61b73d9c8f
@ -383,7 +383,7 @@ function BattleControllerDungeonRune:getRuneTaskAllOver()
|
||||
local chapterCondition = runeData:getChapterCondition(self.chapterId)
|
||||
local taskProgress = ModuleManager.DungeonRuneManager:getTaskStatus(self, chapterCondition)
|
||||
local taskOver = true
|
||||
for type, info in pairs(taskProgress) do
|
||||
for index, info in pairs(taskProgress) do
|
||||
if not info.over then
|
||||
taskOver = false
|
||||
break
|
||||
|
||||
@ -175,7 +175,7 @@ function DungeonRuneManager:getTaskStatus(battleControllerRune, taskInfo)
|
||||
for index, condition in ipairs(taskInfo) do
|
||||
local progress = battleControllerRune:getRuneTaskNumByType(condition)
|
||||
if progress then
|
||||
taskProgress[condition[1]] = {
|
||||
taskProgress[index] = {
|
||||
progress = progress,
|
||||
totalProgress = condition[3],
|
||||
over = progress >= condition[3]
|
||||
|
||||
@ -207,13 +207,14 @@ function BattleRuneResultUI:refreshTaskNode()
|
||||
local taskProgress = ModuleManager.DungeonRuneManager:getTaskStatus(ModuleManager.BattleManager.battleController, chapterCondition)
|
||||
|
||||
for index, objs in ipairs(self.runeTaskCells) do
|
||||
local condition = chapterCondition[index + 1]
|
||||
local newIndex = index + 1
|
||||
local condition = chapterCondition[newIndex]
|
||||
if condition then
|
||||
objs.cell:getBaseObject():setActive(true)
|
||||
local desc = self.runeData:getConditionDesc(condition)
|
||||
local over = false
|
||||
if taskProgress[condition[1]] then
|
||||
local info = taskProgress[condition[1]]
|
||||
if taskProgress[newIndex] then
|
||||
local info = taskProgress[newIndex]
|
||||
over = info.over
|
||||
local color = "#FF4949"
|
||||
if over then
|
||||
|
||||
@ -4,6 +4,7 @@ local GRID_CELL = "app/ui/battle/cell/grid_cell"
|
||||
local SELECT_SKILL_CELL = "app/ui/battle/cell/select_skill_cell"
|
||||
local BATTLE_SELECT_SKILL_COMP = "app/ui/battle/battle_skill_select_comp"
|
||||
local ELIMINATION_TOUCH_EVENT = GConst.ELIMINATION_TOUCH_EVENT
|
||||
local BATTLE_TASK_CELL = "app/ui/battle/cell/battle_task_cell"
|
||||
|
||||
local DEFAULT_X = 10000
|
||||
local BOARD_POS_UP = BF.Vector2(0, 47)
|
||||
@ -31,6 +32,16 @@ function BattleUI:initBaseInfo()
|
||||
self.gridEdgeCacheCell = uiMap["battle_ui.cache_node.grid_edge_cell"]
|
||||
self.topNode = uiMap["battle_ui.top_node"]
|
||||
|
||||
-- taskNode
|
||||
self.taskNode = uiMap["battle_ui.top_node.task_node"]
|
||||
if not self.taskCells then
|
||||
self.taskCells = {}
|
||||
for i = 1, 4 do
|
||||
self.taskCells[i] = CellManager:addCellComp(uiMap["battle_ui.top_node.task_node.battle_task_cell_"], BATTLE_TASK_CELL)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if self.topNode then
|
||||
local comp = self.topNode:getComponent(GConst.TYPEOF_UNITY_CLASS.BF_CANVAS_SORTING_ORDER_HELPER)
|
||||
if not comp then
|
||||
|
||||
31
lua/app/ui/battle/cell/battle_task_cell.lua
Normal file
31
lua/app/ui/battle/cell/battle_task_cell.lua
Normal file
@ -0,0 +1,31 @@
|
||||
local BattleTaskCell = class("BattleTaskCell", BaseCell)
|
||||
|
||||
local BG = {"common_board_131", "common_board_132"} -- 紫绿
|
||||
|
||||
function BattleTaskCell:refresh(iconAtlas, iconName, taskNum)
|
||||
local uiMap = self:getUIMap()
|
||||
local bg = uiMap["rune_task_cell.bg"]
|
||||
local icon = uiMap["rune_task_cell.icon"]
|
||||
local point = uiMap["rune_task_cell.point"]
|
||||
local desc = uiMap["rune_task_cell.desc"]
|
||||
icon:setSprite(iconAtlas, iconName)
|
||||
|
||||
desc:setText(taskNum)
|
||||
self:hidePoint(not taskNum)
|
||||
|
||||
self:hidePoint(false)
|
||||
end
|
||||
|
||||
function BattleTaskCell:hidePoint(hide)
|
||||
local uiMap = self:getUIMap()
|
||||
local point = uiMap["rune_task_cell.point"]
|
||||
local desc = uiMap["rune_task_cell.desc"]
|
||||
point:setVisible(not hide)
|
||||
desc:setVisible(not hide)
|
||||
end
|
||||
|
||||
function BattleTaskCell:addClickListener(func)
|
||||
self:getBaseObject():addClickListener(func)
|
||||
end
|
||||
|
||||
return BattleTaskCell
|
||||
10
lua/app/ui/battle/cell/battle_task_cell.lua.meta
Normal file
10
lua/app/ui/battle/cell/battle_task_cell.lua.meta
Normal file
@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 826bfda5c26cbc54eb4eddaac91b31da
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 3b8b241bab4a4ac9a22fcce9c64f1242, type: 3}
|
||||
@ -34,13 +34,14 @@ function DungeonRuneTaskUI:_display()
|
||||
local count = 0
|
||||
local taskProgress = ModuleManager.DungeonRuneManager:getTaskStatus(ModuleManager.BattleManager.battleController, chapterCondition)
|
||||
for index, cell in ipairs(self.taskCells) do
|
||||
local condition = chapterCondition[index + 1]
|
||||
local newIndex = index + 1
|
||||
local condition = chapterCondition[newIndex]
|
||||
if condition then
|
||||
cell:getBaseObject():setActive(true)
|
||||
local desc = self.runeData:getConditionDesc(condition)
|
||||
local over = false
|
||||
if taskProgress[condition[1]] then
|
||||
local info = taskProgress[condition[1]]
|
||||
if taskProgress[newIndex] then
|
||||
local info = taskProgress[newIndex]
|
||||
over = info.over
|
||||
local color = "#FF4949"
|
||||
if over then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user