This commit is contained in:
puxuan 2025-07-22 20:43:13 +08:00
parent f1e44406bf
commit 90a8351f30

View File

@ -21,7 +21,7 @@ function HeroFormationComp:refresh()
if formation[i] then if formation[i] then
local heroEntity = DataManager.HeroData:getHeroById(formation[i]) local heroEntity = DataManager.HeroData:getHeroById(formation[i])
if heroEntity then if heroEntity then
heroCell:setVisible(true, 1) heroCell:setVisible(true, 0.6)
heroCell:refresh(heroEntity) heroCell:refresh(heroEntity)
heroCell:addClickListener(function() heroCell:addClickListener(function()
ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId()) ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId())
@ -40,7 +40,7 @@ function HeroFormationComp:refreshByFormation(formation)
if formation[i] then if formation[i] then
local heroEntity = DataManager.HeroData:getHeroById(formation[i]) local heroEntity = DataManager.HeroData:getHeroById(formation[i])
if heroEntity then if heroEntity then
heroCell:setVisible(true, 1) heroCell:setVisible(true, 0.6)
heroCell:refresh(heroEntity) heroCell:refresh(heroEntity)
heroCell:addClickListener(function() heroCell:addClickListener(function()
ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId()) ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId())
@ -58,7 +58,7 @@ function HeroFormationComp:refreshByEntitys(formation)
for i, heroCell in ipairs(self.heroCells) do for i, heroCell in ipairs(self.heroCells) do
local heroEntity = formation[i] local heroEntity = formation[i]
if heroEntity then if heroEntity then
heroCell:setVisible(true, 1) heroCell:setVisible(true, 0.6)
heroCell:refreshBriefInfo(heroEntity) heroCell:refreshBriefInfo(heroEntity)
heroCell:addClickListener(function() heroCell:addClickListener(function()
ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId(), true, heroEntity) ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId(), true, heroEntity)