fix bug
This commit is contained in:
parent
e9d0fe30c9
commit
afc8818849
@ -135,6 +135,9 @@ function HeroCell:refreshBriefInfo(heroEntity)
|
|||||||
local level = self.heroEntity:getLv()
|
local level = self.heroEntity:getLv()
|
||||||
self.selfNode:setVisible(false)
|
self.selfNode:setVisible(false)
|
||||||
self.otherNode:setVisible(true)
|
self.otherNode:setVisible(true)
|
||||||
|
local star = heroEntity:getStar()
|
||||||
|
self.starComp:refresh(star)
|
||||||
|
self.unlockTx:setVisible(false)
|
||||||
|
|
||||||
self:_refresh(ConfigManager:getConfig("hero")[id])
|
self:_refresh(ConfigManager:getConfig("hero")[id])
|
||||||
|
|
||||||
|
|||||||
@ -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, 0.6)
|
heroCell:setVisible(true, 0.66)
|
||||||
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, 0.6)
|
heroCell:setVisible(true, 0.66)
|
||||||
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, 0.6)
|
heroCell:setVisible(true, 0.66)
|
||||||
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)
|
||||||
|
|||||||
@ -2,7 +2,7 @@ local HeroListCell = class("HeroListCell", BaseCell)
|
|||||||
|
|
||||||
local H = {
|
local H = {
|
||||||
NORMAL = 260,
|
NORMAL = 260,
|
||||||
HAS_TITLE = 360
|
HAS_TITLE = 330
|
||||||
}
|
}
|
||||||
|
|
||||||
function HeroListCell:init()
|
function HeroListCell:init()
|
||||||
|
|||||||
@ -121,9 +121,15 @@ function MainComp:init()
|
|||||||
ModuleManager.MaincityManager:showChapterBoxUI(chapterId)
|
ModuleManager.MaincityManager:showChapterBoxUI(chapterId)
|
||||||
end)
|
end)
|
||||||
uiMap["main_comp.arena_btn"]:addClickListener(function()
|
uiMap["main_comp.arena_btn"]:addClickListener(function()
|
||||||
|
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.ARENA) then
|
||||||
|
return
|
||||||
|
end
|
||||||
ModuleManager.ArenaManager:reqArenaInfo(true)
|
ModuleManager.ArenaManager:reqArenaInfo(true)
|
||||||
end)
|
end)
|
||||||
uiMap["main_comp.daily_challenge_btn"]:addClickListener(function()
|
uiMap["main_comp.daily_challenge_btn"]:addClickListener(function()
|
||||||
|
if not ModuleManager:getIsOpen(ModuleManager.MODULE_KEY.DAILY_CHALLENGE) then
|
||||||
|
return
|
||||||
|
end
|
||||||
ModuleManager.DailyChallengeManager:showDailyChallengeUI()
|
ModuleManager.DailyChallengeManager:showDailyChallengeUI()
|
||||||
end)
|
end)
|
||||||
self.leftArrowBtn:addClickListener(function()
|
self.leftArrowBtn:addClickListener(function()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user