竞技场匹配阵容提示优化
This commit is contained in:
parent
e68de8da6c
commit
0a78db2330
@ -1,7 +1,7 @@
|
||||
local HeroManager = class("HeroManager", BaseModule)
|
||||
|
||||
function HeroManager:showHeroDetailUI(heroId, onlyLook)
|
||||
UIManager:showUI("app/ui/hero/hero_detail_ui", {heroId = heroId, onlyLook = onlyLook})
|
||||
function HeroManager:showHeroDetailUI(heroId, onlyLook, heroEntity)
|
||||
UIManager:showUI("app/ui/hero/hero_detail_ui", {heroId = heroId, onlyLook = onlyLook, heroEntity = heroEntity})
|
||||
end
|
||||
|
||||
function HeroManager:showHeroUnlockUI(heroIdList)
|
||||
|
||||
@ -42,6 +42,10 @@ function HeroFormationComp:refreshBriefInfo(formation)
|
||||
if formation[i] and DataManager.HeroData:isExistHeroById(formation[i].id) then
|
||||
heroCell:setVisible(true, 1)
|
||||
heroCell:refreshBriefInfo(formation[i].id, formation[i].level)
|
||||
heroCell:addClickListener(function()
|
||||
local heroEntity = DataManager.HeroData:getEntity(formation[i])
|
||||
ModuleManager.HeroManager:showHeroDetailUI(formation[i].id, true, heroEntity)
|
||||
end)
|
||||
else
|
||||
heroCell:setVisible(false)
|
||||
end
|
||||
|
||||
@ -20,9 +20,13 @@ function HeroDetailUI:onPressBackspace()
|
||||
end
|
||||
|
||||
function HeroDetailUI:ctor(parmas)
|
||||
local heroId = parmas.heroId
|
||||
self.onlyLook = parmas.onlyLook
|
||||
if parmas.heroEntity then
|
||||
self.heroEntity = parmas.heroEntity
|
||||
else
|
||||
local heroId = parmas.heroId
|
||||
self.heroEntity = DataManager.HeroData:getHeroById(heroId)
|
||||
end
|
||||
end
|
||||
|
||||
function HeroDetailUI:onLoadRootComplete()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user