From 181e5dcb63d526390de529188b1ec2ab48e653a5 Mon Sep 17 00:00:00 2001 From: ZhangBiao Date: Tue, 14 Dec 2021 17:19:22 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=91=BD=E6=A0=BC=E3=80=91=E8=83=8C?= =?UTF-8?q?=E5=8C=85=E9=A1=B5=E7=AD=BE=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua b/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua index 8618596ada..e74252f8f4 100644 --- a/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua +++ b/Assets/ManagedResources/~Lua/Modules/Bag/BagPanel.lua @@ -23,6 +23,7 @@ function BagPanel:InitComponent() this.spLoader = SpriteLoader.New() this.BtnBack = Util.GetGameObject(self.transform, "rightUp/btnBack") + this.box = Util.GetGameObject(self.transform, "Grid/box") for i = 1, 9 do tabs1[i] = Util.GetGameObject(self.transform, "Grid/box/Btn" .. i) tabs1RedPoint[i] = Util.GetGameObject(self.transform, "Grid/box/Btn" .. i .. "/redPoint") @@ -640,6 +641,7 @@ end --特殊的开启条件 function this.SetBottomBarIsActive() local ConfigData = ConfigManager.GetConfig(ConfigName.SpecialConfig) + local num = 0 for i = 1, #tabs1 do --为宝物定开启规则 if i == 5 then @@ -655,7 +657,11 @@ function this.SetBottomBarIsActive() elseif i == 9 then--命格 tabs1[i]:SetActive(ActTimeCtrlManager.SingleFuncState(FUNCTION_OPEN_TYPE.Gem)) end + if tabs1[i].activeInHierarchy then + num = num + 1 + end end + this.box:GetComponent("RectTransform").pivot = num > 5 and Vector2.New(0.5, 0) or Vector2.New(0.5, 0.5) end local orginLayer