-- 竞技场:调整阵容 local ArenaFormationUI = class("ArenaFormationUI", BaseUI) function ArenaFormationUI:isFullScreen() return true end function ArenaFormationUI:showCommonBG() return false end function ArenaFormationUI:getPrefabPath() return "assets/prefabs/ui/arena/arena_formation_ui.prefab" end function ArenaFormationUI:onPressBackspace() self:closeUI() end -- function ArenaFormationUI:getCurrencyParams() -- if self.currencyParams == nil then -- self.currencyParams = { -- itemIds = { -- GConst.ItemConst.ITEM_ID_GEM, -- GConst.ItemConst.ITEM_ID_ARENA_TICKET -- }, -- showType = GConst.CURRENCY_TYPE.HORIZONTAL -- } -- end -- return self.currencyParams -- end function ArenaFormationUI:ctor(params) self.formationType = params end function ArenaFormationUI:onCover() end function ArenaFormationUI:onReshow() end function ArenaFormationUI:onClose() end function ArenaFormationUI:onLoadRootComplete() local uiMap = self.root:genAllChildren() uiMap["arena_formation_ui.banner.btn_ok.tx_ok"]:setText(I18N:getGlobalText(I18N.GlobalConst.ARENA_DESC_24)) uiMap["arena_formation_ui.banner.btn_ok"]:addClickListener(function() ModuleManager.FormationManager:reqArenaFormation() if self.isMatch then UIManager:showUI("app/ui/arena/arena_match_ui", true) end self:closeUI() end) local heroUI = uiMap["arena_formation_ui.hero_ui"] heroUI:initPrefabHelper() heroUI:genAllChildren() self.heroComp = heroUI:addLuaComponent("app/ui/hero/hero_comp") self:bind(DataManager.HeroData, "isDirty", function() self:onRefresh() end) self:bind(DataManager.BagData.ItemData, "dirty", function() self:onRefresh() end) end function ArenaFormationUI:onRefresh() if self.formationType == GConst.BattleConst.FORMATION_TYPE.ARENA_ATTACK then -- 从匹配界面进来的 self.isMatch = true end self.heroComp:refresh(self.formationType) end return ArenaFormationUI