战斗退出后显示主界面控制
This commit is contained in:
parent
be52bb20b6
commit
be6d42fe88
@ -71,10 +71,7 @@ function DailyChallengeManager:rspStartChallenge(result)
|
|||||||
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
if result.err_code == GConst.ERROR_STR.SUCCESS then
|
||||||
DataManager.DailyChallengeData:onFightCountReduce()
|
DataManager.DailyChallengeData:onFightCountReduce()
|
||||||
DataManager.DailyChallengeData:setFixedChapterId(result.today_fixed_chapter_id)
|
DataManager.DailyChallengeData:setFixedChapterId(result.today_fixed_chapter_id)
|
||||||
ModuleManager.BattleManager:playBattle(GConst.BattleConst.BATTLE_TYPE.DAILY_CHALLENGE, {}, function()
|
ModuleManager.BattleManager:playBattle(GConst.BattleConst.BATTLE_TYPE.DAILY_CHALLENGE)
|
||||||
UIManager:closeAllUI()
|
|
||||||
ModuleManager.MaincityManager:showMainCityUI(false, GConst.MainCityConst.MAIN_MODULE.DAILY_CHALLENGE)
|
|
||||||
end)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -98,4 +98,16 @@ function MaincityManager:isActivSideBarModule(moduleKey)
|
|||||||
return mainUI:isActivSideBarModule(moduleKey)
|
return mainUI:isActivSideBarModule(moduleKey)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function MaincityManager:setCurModule(moduleKey)
|
||||||
|
self.curModule = moduleKey
|
||||||
|
end
|
||||||
|
|
||||||
|
function MaincityManager:getCurModule()
|
||||||
|
if not self.curModule then
|
||||||
|
-- 默认进主线章节
|
||||||
|
return GConst.MainCityConst.MAIN_MODULE.CHAPTER
|
||||||
|
end
|
||||||
|
return self.curModule
|
||||||
|
end
|
||||||
|
|
||||||
return MaincityManager
|
return MaincityManager
|
||||||
@ -7,7 +7,7 @@ local BOTTOM_HEIGHT = 120
|
|||||||
function MainComp:init()
|
function MainComp:init()
|
||||||
self.uiMap = self:getBaseObject():genAllChildren()
|
self.uiMap = self:getBaseObject():genAllChildren()
|
||||||
|
|
||||||
self:refreshModule(GConst.MainCityConst.MAIN_MODULE.CHAPTER)
|
self:refreshModule(ModuleManager.MaincityManager:getCurModule())
|
||||||
self:initStageFormation()
|
self:initStageFormation()
|
||||||
|
|
||||||
end
|
end
|
||||||
@ -29,6 +29,7 @@ function MainComp:refreshModule(selectModule)
|
|||||||
|
|
||||||
if self.curModuleType ~= selectModule then
|
if self.curModuleType ~= selectModule then
|
||||||
self.curModuleType = selectModule
|
self.curModuleType = selectModule
|
||||||
|
ModuleManager.MaincityManager:setCurModule(self.curModuleType)
|
||||||
if self.curModuleType == GConst.MainCityConst.MAIN_MODULE.CHAPTER then
|
if self.curModuleType == GConst.MainCityConst.MAIN_MODULE.CHAPTER then
|
||||||
-- 切换到主线章节
|
-- 切换到主线章节
|
||||||
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.GO_CHAPTER)
|
EventManager:dispatchEvent(EventManager.CUSTOM_EVENT.GO_CHAPTER)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user