【主城】右侧下拉调修复
parent
67dd2abbcb
commit
dc4581433e
|
@ -1225,37 +1225,4 @@ function this.CheckRedPointChaofanRuSheng()
|
|||
return false
|
||||
end
|
||||
|
||||
--右侧伸缩条大小检测
|
||||
function this.CheckRightUpArenaSize()
|
||||
local num = 0
|
||||
--首充检测
|
||||
local act1 = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.FirstRecharge)
|
||||
if act1 then
|
||||
num = num + 1
|
||||
end
|
||||
--每日豪礼检测
|
||||
local act2 = ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.DailyRecharge)
|
||||
if act2 then
|
||||
num = num + 1
|
||||
end
|
||||
--限时折扣检测
|
||||
local actGroup = ConfigManager.GetConfig(ConfigName.ActivityGroups)
|
||||
local shopData = actGroup[13].ShopData
|
||||
local giftList = OperatingManager.GetInfoList(shopData)
|
||||
if #giftList > 0 then
|
||||
local time = giftList[1].endTime - GetTimeStamp()
|
||||
if time > 1 then
|
||||
num = num + 1
|
||||
end
|
||||
end
|
||||
local y = 0
|
||||
if num == 1 then
|
||||
y = 512
|
||||
elseif num == 2 then
|
||||
y = 663
|
||||
elseif num == 3 then
|
||||
y = 814
|
||||
end
|
||||
return y
|
||||
end
|
||||
return this
|
|
@ -800,6 +800,7 @@ function this.CreatActivity()
|
|||
Game.GlobalEvent:DispatchEvent(GameEvent.PatFace.RefreshRightUp)
|
||||
end
|
||||
|
||||
local ySet = {[1] = 361 ,[2] = 512,[3] = 663,[4] = 814,[5] = 965 }
|
||||
--设置右侧条
|
||||
function this.SetRightBarSize()
|
||||
this.RightUp2:SetActive(PlayerManager.level >= 5)
|
||||
|
@ -809,7 +810,13 @@ function this.SetRightBarSize()
|
|||
this.RightUp2rectSize.sizeDelta = Vector3.New(180,220,0)
|
||||
this.RightUp2btnImg.rotation = Quaternion.Euler(Vector3.New(0,0,-90))
|
||||
else
|
||||
local y = ActivityGiftManager.CheckRightUpArenaSize()
|
||||
local num = 0
|
||||
for i = 1, this.RightUp2Grid.transform.childCount do
|
||||
if this.RightUp2Grid.transform:GetChild(i - 1).gameObject.activeInHierarchy then
|
||||
num = num + 1
|
||||
end
|
||||
end
|
||||
local y = ySet[num]
|
||||
this.RightUp2bgSize.sizeDelta =Vector3.New(180,y,0)
|
||||
this.RightUp2rectSize.sizeDelta = Vector3.New(180,y,0)
|
||||
this.RightUp2btnImg.rotation = Quaternion.Euler(Vector3.New(0,0,90))
|
||||
|
|
Loading…
Reference in New Issue