From 10132cc75fb23eb14c318c68cfed9e29cc75439a Mon Sep 17 00:00:00 2001 From: zhangqiang <657634622@qq.com> Date: Sat, 12 Dec 2020 13:57:18 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=AF=8F=E6=97=A5=E7=99=BB=E9=99=86?= =?UTF-8?q?=E9=A2=86=E5=A5=96=E3=80=91=E8=83=8C=E6=99=AF=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E4=B8=8D=E5=85=A8=EF=BC=8C=E5=A4=9A=E6=AC=A1=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E5=90=8E=E5=90=84=E5=A5=96=E5=8A=B1=E8=AF=A6=E6=83=85=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E5=BC=B9=E7=AA=97=20bug=20=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Modules/EightDay/EightDayGiftPanel.lua | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/EightDay/EightDayGiftPanel.lua b/Assets/ManagedResources/~Lua/Modules/EightDay/EightDayGiftPanel.lua index bbf945e873..fc5de605d0 100644 --- a/Assets/ManagedResources/~Lua/Modules/EightDay/EightDayGiftPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/EightDay/EightDayGiftPanel.lua @@ -234,7 +234,10 @@ function EightDayGiftPanel:SetSingleReward(item,i) --点击奖励时更改背景 Util.AddOnceClick(event,function() - poolManager:UnLoadLive(bgName, Live) + if Live then + poolManager:UnLoadLive(bgName, Live) + Live = nil + end this:SetBg(i) if ItemConfig[EightDayRewardConfig[i].Reward[1][1]].ItemType == 13 then UIManager.OpenPanel(UIName.SoulPrintPopUp,3,nil,EightDayRewardConfig[i].Reward[1][1],nil,nil) @@ -245,7 +248,10 @@ function EightDayGiftPanel:SetSingleReward(item,i) end) Util.AddOnceClick(reward,function() - poolManager:UnLoadLive(bgName, Live) + if Live then + poolManager:UnLoadLive(bgName, Live) + Live = nil + end this:SetBg(i) end) @@ -261,7 +267,10 @@ function EightDayGiftPanel:SetRemainTime(day,i) local t = CalculateSecondsNowTo_N_OClock(5) if t-1 < 0 then Timer.New(function() - poolManager:UnLoadLive(bgName, Live) + if Live then + poolManager:UnLoadLive(bgName, Live) + Live = nil + end this:Refresh() end, 1, 1, true):Start() end @@ -289,7 +298,10 @@ end --界面关闭时调用(用于子类重写) function EightDayGiftPanel:OnClose() - poolManager:UnLoadLive(bgName, Live) + if Live then + poolManager:UnLoadLive(bgName, Live) + Live = nil + end end --界面销毁时调用(用于子类重写)