diff --git a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua index 080a901d44..534e6c1737 100644 --- a/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua +++ b/Assets/ManagedResources/~Lua/Modules/Formation/FormationPanelV2.lua @@ -239,22 +239,10 @@ function this:OnOpen(_panelType,...) SoundManager.PlaySound(SoundConfig.Sound_BattleStart_01) end -function this:SetCampIcon() - if panelType == FORMATION_TYPE.FOUR_ELEMENT then - this.opView.SetCampIconByCurType(tabs,this.selectBtn) - else - for i = 0 , #tabs do - Util.SetGray(tabs[i],false) - tabs[i]:GetComponent("Button").enabled = true - end - end -end - function this:OnShow() this.ElementalResonanceView:OnOpen({sortOrder=self.sortingOrder}) this.SetDrawLevel() this.RefreshFormation(true,true) - this:SetCampIcon() end function this:OnClose() @@ -505,12 +493,8 @@ end --点击筛选 -function this.OnClickTabBtn(_proId, isTop,isAni) +function this.OnClickTabBtn(_proId, isTop,isAni) local heros - this.selectBtn:SetActive(proId ==_proId) - this.selectBtn.transform:SetParent(tabs[_proId].transform) - this.selectBtn.transform:DOAnchorPos(Vector3.zero,0) - this.selectBtn.transform:DOScale(Vector3.one,0) if this.curFormationIndex == FormationTypeDef.EXPEDITION then if _proId == ProIdConst.All then heros = HeroManager.GetAllHeroDatas(limitLevel) @@ -530,6 +514,19 @@ function this.OnClickTabBtn(_proId, isTop,isAni) end this.empty:SetActive(#heros<=0) this.SetRoleList(heros, isTop,isAni) + if panelType == FORMATION_TYPE.FOUR_ELEMENT then + this.opView.SetCampIconByCurType(tabs,this.selectBtn) + else + for i = 0 , #tabs do + Util.SetGray(tabs[i],false) + tabs[i]:GetComponent("Button").enabled = true + end + this.selectBtn:SetActive(proId ==_proId) + this.selectBtn.transform:SetParent(tabs[_proId].transform) + this.selectBtn.transform:DOAnchorPos(Vector3.zero,0) + this.selectBtn.transform:DOScale(Vector3.one,0) + end + end --设置英雄列表数据 @@ -867,7 +864,7 @@ function this.OnEndDrag(Pointgo,data)--结束拖动 end this.line.gameObject:SetActive(false) this.SetCardsData() - --this.OnClickTabBtn(proId) + this.OnClickTabBtn(proId) end function this.OnDrag(Pointgo,data)--拖动中 if data.pointerEnter==nil then--拖到屏幕外