This commit is contained in:
chenxi 2023-04-19 15:36:44 +08:00
parent f0cb7a6d73
commit f9b9dc1726
3 changed files with 4 additions and 3 deletions

View File

@ -91,6 +91,7 @@ end
function BattleUnitComp:resetBeforeAttack() function BattleUnitComp:resetBeforeAttack()
self.attackCount = 0 self.attackCount = 0
self.baseObject:getTransform():SetAsLastSibling()
end end
function BattleUnitComp:initPassiveSkills() function BattleUnitComp:initPassiveSkills()

View File

@ -64,8 +64,8 @@ function HeroCell:addClickListener(callback)
self.clickCallback = callback self.clickCallback = callback
end end
function HeroCell:setVisible(visible) function HeroCell:setVisible(visible, scale)
self.baseObject:setVisible(visible) self.baseObject:setVisible(visible, scale)
end end
function HeroCell:setGray(isGray) function HeroCell:setGray(isGray)

View File

@ -129,7 +129,7 @@ function MainComp:refreshStageFormaion()
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) heroCell:setVisible(true, 0.84)
heroCell:refresh(heroEntity) heroCell:refresh(heroEntity)
heroCell:addClickListener(function() heroCell:addClickListener(function()
ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId()) ModuleManager.HeroManager:showHeroDetailUI(heroEntity:getCfgId())