【命格】背包页签位置

dev_chengFeng
ZhangBiao 2021-12-14 17:19:22 +08:00
parent e1a9459101
commit 181e5dcb63
1 changed files with 6 additions and 0 deletions

View File

@ -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