From 309486e4435d60a61489cc6283e9ae9bd0415eb1 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Fri, 16 Jul 2021 16:54:17 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=82=B9=E5=B0=86=E5=8F=B0=E3=80=91?= =?UTF-8?q?=E6=8A=A5=E9=94=99=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Recruit/RecruitMainPanel.lua | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua index 9de1afd2f5..70f88945d1 100644 --- a/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Recruit/RecruitMainPanel.lua @@ -343,22 +343,22 @@ function this:SetIndex() LOY = 3 else LOY = 2 - end - local offSet = math.abs(this.itemList[i].index - 2) - local isenter = true - self.thread = coroutine.start(function() - while(offSet > 0) do + end + local offSet = math.abs(this.itemList[i].index - 2) + local isenter = true + self.thread = coroutine.start(function() + while(offSet > 0) do if isenter then isenter = false this.mask:SetActive(true) this.MoveTo(LOY) Timer.New(function() - offSet = offSet - 1 + offSet = offSet - 1 this.SortItemList() isenter = true - end,0.25):Start() - end - coroutine.wait(0.01) + end,0.25):Start() + end + coroutine.wait(0.01) end this.mask:SetActive(false) this.select.transform:SetParent(this.itemList[2].go.transform) @@ -377,7 +377,7 @@ function this:PageOnChange() RecruitManager.CurRecruitId = self.CurRecruitId if subViewList[lastIndex] and subViewList[lastIndex].config and subViewList[lastIndex].sub then subViewList[lastIndex].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) else @@ -434,7 +434,12 @@ end --界面关闭时调用(用于子类重写) function RecruitMainPanel:OnClose() - --清除红点 + --清除红点 + this.select.transform:SetParent(this.tabbox.transform) + if self.thread then + coroutine.stop(self.thread) + self.thread = nil + end for k,v in pairs(redPointTypeList) do ClearRedPointObject(k,v) end