diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/ElementDrawCardPanelNew.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/ElementDrawCardPanelNew.lua index 32d4cfd785..286fa196a6 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/ElementDrawCardPanelNew.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/ElementDrawCardPanelNew.lua @@ -1,4 +1,5 @@ ElementDrawCardPanelNew = {} +local isPlayAnim = true function ElementDrawCardPanelNew:New(gameObject) local b = {} b.gameObject = gameObject @@ -142,6 +143,7 @@ end function ElementDrawCardPanelNew:OnOpen(_Config,_index, parent) self.config = _Config self.parent = parent + isPlayAnim = true end --界面打开或者重新打开后,界面刷新时调用(用于子类重写) @@ -157,14 +159,17 @@ function ElementDrawCardPanelNew:OnShow(orginLayer) Util.SetParticleSortLayer(self.UI_effect_RecruitPanel_particle, self.sortingOrder + 1) Util.SetParticleSortLayer(self.qianghua, self.sortingOrder + 1) self.itemPosCom.enabled = false - local anims = self.gameObject:GetComponentsInChildren(typeof(PlayFlyAnim)) - if anims.Length > 0 then - for i = 0, anims.Length - 1 do - local anim = anims[i] - if anim.isPlayOnOpen then - anim:PlayAnim(false,function() - self.itemPosCom.enabled = true - end) + if isPlayAnim then + isPlayAnim = false + local anims = self.gameObject:GetComponentsInChildren(typeof(PlayFlyAnim)) + if anims.Length > 0 then + for i = 0, anims.Length - 1 do + local anim = anims[i] + if anim.isPlayOnOpen then + anim:PlayAnim(false,function() + self.itemPosCom.enabled = true + end) + end end end end @@ -176,6 +181,7 @@ end --界面关闭时调用(用于子类重写) function ElementDrawCardPanelNew:OnClose() + isPlayAnim = true self.gameObject:SetActive(false) end diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua index e9d235b14d..ac51007de5 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua @@ -439,7 +439,9 @@ function this:PageOnChange(isShow) end end for k,v in pairs(subViewList) do - v.sub:OnClose() + if k ~= self.curPage then + v.sub:OnClose() + end end if subViewList[self.curPage] and subViewList[self.curPage].config and subViewList[self.curPage].sub then subViewList[self.curPage].sub:OnShow(orginLayer)