显示调整
This commit is contained in:
parent
d8c8591e40
commit
441a42c087
@ -3,17 +3,11 @@ local ChapterCell = class("ChapterCell", BaseCell)
|
|||||||
function ChapterCell:refresh(id)
|
function ChapterCell:refresh(id)
|
||||||
local uiMap = self:getUIMap()
|
local uiMap = self:getUIMap()
|
||||||
local index = self:getIndex()
|
local index = self:getIndex()
|
||||||
local bg1 = uiMap["chapter_cell.bg_1"]
|
|
||||||
local bg2 = uiMap["chapter_cell.bg_2"]
|
|
||||||
local touchNode = uiMap["chapter_cell.touch_node"]
|
local touchNode = uiMap["chapter_cell.touch_node"]
|
||||||
|
|
||||||
if index % 2 ~= 0 then -- 奇数
|
if index % 2 ~= 0 then -- 奇数
|
||||||
bg1:setVisible(true)
|
|
||||||
bg2:setVisible(false)
|
|
||||||
touchNode:setAnchoredPositionX(-125)
|
touchNode:setAnchoredPositionX(-125)
|
||||||
else
|
else
|
||||||
bg1:setVisible(false)
|
|
||||||
bg2:setVisible(true)
|
|
||||||
touchNode:setAnchoredPositionX(125)
|
touchNode:setAnchoredPositionX(125)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -43,12 +37,8 @@ function ChapterCell:refresh(id)
|
|||||||
local armorData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_ARMOR)
|
local armorData = DataManager.DungeonData:getDungeonDataByType(ModuleManager.MODULE_KEY.DUNGEON_ARMOR)
|
||||||
local config = armorData:getConfig(id)
|
local config = armorData:getConfig(id)
|
||||||
local starNum = armorData:getStarNum(id)
|
local starNum = armorData:getStarNum(id)
|
||||||
bgNode:setVisible(true)
|
|
||||||
bgNode:setSprite(GConst.ATLAS_PATH.UI_DUGEON_ARMOR, config.stage_icon)
|
bgNode:setSprite(GConst.ATLAS_PATH.UI_DUGEON_ARMOR, config.stage_icon)
|
||||||
spineNode:setVisible(false)
|
spineNode:setVisible(false)
|
||||||
bgNode:setImageGray(false)
|
|
||||||
bottomBg:setImageGray(false)
|
|
||||||
chapterNode:setImageGray(false)
|
|
||||||
if armorData:canFarmChapter(id) then -- 可扫荡
|
if armorData:canFarmChapter(id) then -- 可扫荡
|
||||||
farmNode:setVisible(true)
|
farmNode:setVisible(true)
|
||||||
chapterNode:setAnchoredPositionY(43)
|
chapterNode:setAnchoredPositionY(43)
|
||||||
@ -70,14 +60,14 @@ function ChapterCell:refresh(id)
|
|||||||
else
|
else
|
||||||
chapterNode:setAnchoredPositionY(8)
|
chapterNode:setAnchoredPositionY(8)
|
||||||
starNode:setVisible(false)
|
starNode:setVisible(false)
|
||||||
bgNode:setVisible(false)
|
|
||||||
spineNode:setVisible(true)
|
spineNode:setVisible(true)
|
||||||
spineObj:setVisible(false)
|
spineObj:setVisible(false)
|
||||||
|
bgNode:setSprite(GConst.ATLAS_PATH.UI_DUGEON_ARMOR, "dungeon_armor_house_bg_2")
|
||||||
local monsterId = config.monster[#config.monster]
|
local monsterId = config.monster[#config.monster]
|
||||||
local monsterConfig = ConfigManager:getConfig("monster")[monsterId]
|
local monsterConfig = ConfigManager:getConfig("monster")[monsterId]
|
||||||
local spineName = monsterConfig.model_id
|
local spineName = monsterConfig.model_id
|
||||||
spineObj:loadAssetAsync(spineName, function()
|
spineObj:loadAssetAsync(spineName, function()
|
||||||
spineObj:setVisible(true, 0.75)
|
spineObj:setVisible(true, 0.65)
|
||||||
spineObj:playAnim("idle", true, false, true)
|
spineObj:playAnim("idle", true, false, true)
|
||||||
end, true)
|
end, true)
|
||||||
end
|
end
|
||||||
@ -89,13 +79,11 @@ function ChapterCell:refresh(id)
|
|||||||
chapterNode:setAnchoredPositionY(8)
|
chapterNode:setAnchoredPositionY(8)
|
||||||
starNode:setVisible(false)
|
starNode:setVisible(false)
|
||||||
|
|
||||||
bgNode:setImageGray(true)
|
|
||||||
bottomBg:setImageGray(true)
|
|
||||||
chapterNode:setImageGray(true)
|
|
||||||
|
|
||||||
touchNode:addClickListener(function()
|
touchNode:addClickListener(function()
|
||||||
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.PASS_REQUIRE))
|
GFunc.showToast(I18N:getGlobalText(I18N.GlobalConst.PASS_REQUIRE))
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
bgNode:setSprite(GConst.ATLAS_PATH.UI_DUGEON_ARMOR, config.stage_icon .. "_1")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user