From 82dd1b6512cf92bc23c65f1417a05254810b3bbc Mon Sep 17 00:00:00 2001 From: gaoxin Date: Mon, 8 Nov 2021 11:20:30 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=88=91=E8=A6=81=E5=8F=98=E5=BC=BA?= =?UTF-8?q?=E3=80=91=E5=88=87=E6=8D=A2=E9=A1=B5=E7=AD=BE=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../~Lua/Modules/Power/GiveMePowerPanel.lua | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Assets/ManagedResources/~Lua/Modules/Power/GiveMePowerPanel.lua b/Assets/ManagedResources/~Lua/Modules/Power/GiveMePowerPanel.lua index dc5ce7a445..6f0a29409c 100644 --- a/Assets/ManagedResources/~Lua/Modules/Power/GiveMePowerPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Power/GiveMePowerPanel.lua @@ -58,9 +58,9 @@ function TempPool:RecycleAll() end end function TempPool:Destroy() - self.MomNode = nil - self.NodeList = nil - self.UsedIndex = nil + self.MomNode = {} + self.NodeList = {} + self.UsedIndex = {} end -- 按钮开闭状态改变 @@ -148,12 +148,6 @@ function GiveMePowerPanel:BindEvent() end) end - -- 初始化Tab管理器 - this.TabCtrl = TabBox.New() - this.TabCtrl:SetTabAdapter(this.TabAdapter) - this.TabCtrl:SetChangeTabCallBack(this.OnTabChange) - this.TabCtrl:Init(this.tabbox, _TabData) - -- 初始化对象池 TempPool:Init() --TempPool:Register("res1", this.resItem1) @@ -590,6 +584,13 @@ function GiveMePowerPanel:OnOpen(...) -- 检测任务 -- UKnowNothingToThePowerManager.CheckTask() -- + + -- 初始化Tab管理器 + this.TabCtrl = TabBox.New() + this.TabCtrl:SetTabAdapter(this.TabAdapter) + this.TabCtrl:SetChangeTabCallBack(this.OnTabChange) + this.TabCtrl:Init(this.tabbox, _TabData) + if this.TabCtrl then this.TabCtrl:ChangeTab(1) end