From 95d7c4cfea1a906386b8ad41b67e9f507ddb670c Mon Sep 17 00:00:00 2001 From: jiaoyangna <3046463818@qq.com> Date: Thu, 11 Mar 2021 15:26:57 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=9B=9B=E7=81=B5=E8=AF=95=E7=82=BC?= =?UTF-8?q?=E3=80=91=E6=89=8B=E5=8A=A8=E4=B8=8B=E9=98=B5=E7=A5=9E=E5=B0=86?= =?UTF-8?q?=EF=BC=8C=E7=A5=9E=E5=B0=86=E7=8A=B6=E6=80=81=E4=B8=8D=E4=BC=9A?= =?UTF-8?q?=E5=8F=98=EF=BC=8C=E8=BF=98=E6=98=AF=E2=80=9C=E5=B7=B2=E4=B8=8A?= =?UTF-8?q?=E9=98=B5=E2=80=9D=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/Formation/FormationPanelV2.lua | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) 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--拖到屏幕外