【主城】右上伸缩条闪烁修改

dev_chengFeng
ZhangBiao 2021-06-21 16:57:22 +08:00
parent 3f320f1e89
commit fe16795d8c
2 changed files with 41 additions and 8 deletions

View File

@ -1200,16 +1200,16 @@ function this.CheckYunYouManRedPoint()
if id and id > 0 then
local str = PlayerPrefs.GetInt(PlayerManager.uid.."CommonActPage"..ActivityTypeDef.YunYouShangRen)
if str == 1 then
LogGreen("云游商人红点返回false")
-- LogGreen("云游商人红点返回false")
return false
else
LogGreen("云游商人红点返回true")
-- LogGreen("云游商人红点返回true")
return true
end
end
end
--超凡入圣红点检查
function this.CheckRedPointChaofanRuSheng()
if not ActivityGiftManager.IsActivityTypeOpen(ActivityTypeDef.ChaoFanRuSheng) then
return false
@ -1224,4 +1224,38 @@ function this.CheckRedPointChaofanRuSheng()
end
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

View File

@ -253,7 +253,7 @@ function this:InitComponent()
this.RightUp2btn = Util.GetGameObject(this.RightUp2,"BG/Button")
this.RightUp2btnImg = Util.GetGameObject(this.RightUp2,"BG/Button"):GetComponent("RectTransform")
this.RightUp2rectSize = Util.GetGameObject(this.RightUp2,"Ract2D"):GetComponent("RectTransform")
this.RightUp2gridSize = this.RightUp2Grid :GetComponent("RectTransform")
this.RightUp2gridSize = this.RightUp2Grid:GetComponent("RectTransform")
this.jiantouObj=Util.GetGameObject(self.gameObject, "jiantouObj")
end
@ -729,7 +729,6 @@ end
function this:OnOpen()
activitys = DynamicActivityManager.GetActivityTableDataByPageInde(0)
this.CreatActivity()
FixedUpdateBeat:Add(this.OnUpdate, self)--长按方法注册
end
@ -804,15 +803,15 @@ end
--设置右侧条
function this.SetRightBarSize()
this.RightUp2:SetActive(PlayerManager.level >= 5)
local str = PlayerPrefs.GetInt(PlayerManager.uid.."MainRightBarSetting")
if not str or str == 0 then
this.RightUp2bgSize.sizeDelta = Vector3.New(180,320,0)
this.RightUp2rectSize.sizeDelta = Vector3.New(180,220,0)
this.RightUp2btnImg.rotation = Quaternion.Euler(Vector3.New(0,0,-90))
else
this.RightUp2bgSize.sizeDelta = this.RightUp2gridSize.sizeDelta + Vector3.New(0,100,0)
this.RightUp2rectSize.sizeDelta = this.RightUp2gridSize.sizeDelta
local y = ActivityGiftManager.CheckRightUpArenaSize()
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))
end
Util.AddOnceClick(this.RightUp2btn.gameObject,function()