引导问题修复
This commit is contained in:
parent
62989cb4cf
commit
9f9ee9e1d9
@ -6,8 +6,8 @@ local ARENA_COMP = "app/ui/main_city/component/arena_comp"
|
||||
|
||||
local BOTTOM_HEIGHT = 120
|
||||
|
||||
function MainComp:ctor(params)
|
||||
self.parentUI = params.parentUI
|
||||
function MainComp:setParentUI(parentUI)
|
||||
self.parentUI = parentUI
|
||||
end
|
||||
|
||||
function MainComp:init()
|
||||
|
||||
@ -327,7 +327,7 @@ function MainCityUI:initComp()
|
||||
local mainComp = uiMap["main_ui.sub_ui_node.main_comp"]
|
||||
mainComp:initPrefabHelper()
|
||||
mainComp:genAllChildren()
|
||||
self.mainComp = mainComp:addLuaComponent(MAIN_COMP, {parentUI = self})
|
||||
self.mainComp = mainComp:addLuaComponent(MAIN_COMP)
|
||||
self.subComps[GConst.MainCityConst.BOTTOM_PAGE.MAIN] = self.mainComp
|
||||
-- 英雄
|
||||
local heroComp = uiMap["main_ui.sub_ui_node.hero_ui"]
|
||||
@ -340,6 +340,9 @@ function MainCityUI:initComp()
|
||||
shopComp:initPrefabHelper()
|
||||
shopComp:genAllChildren()
|
||||
self.subComps[GConst.MainCityConst.BOTTOM_PAGE.SHOP] = shopComp:addLuaComponent(SHOP_COMP)
|
||||
|
||||
-- 初始完成后设置
|
||||
self.mainComp:setParentUI(self)
|
||||
end
|
||||
end
|
||||
|
||||
@ -758,8 +761,10 @@ function MainCityUI:switchMainCompModule(moduleKey)
|
||||
if self.selectedIndex ~= GConst.MainCityConst.BOTTOM_PAGE.MAIN then
|
||||
return
|
||||
end
|
||||
|
||||
self.mainComp:refreshModule(ModuleManager.MaincityManager:getCurModule())
|
||||
if ModuleManager.MaincityManager:getCurModule() == GConst.MainCityConst.MAIN_MODULE.CHAPTER then
|
||||
self:checkMainPop()
|
||||
end
|
||||
local module = self.mainComp:getCurModule()
|
||||
if module then
|
||||
self:setTopNodeVisible(module:isShowTopNode())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user