2021-04-20 13:58:00 +08:00
|
|
|
GuildRedPacketManager = {}
|
2020-05-09 13:31:21 +08:00
|
|
|
local this = GuildRedPacketManager
|
|
|
|
|
|
|
|
-- 默认未检查公会红包
|
|
|
|
this.isCheck=false
|
|
|
|
|
|
|
|
function this.Initialize()
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
-- 检查公会红包红点
|
|
|
|
function this.CheckGuildRedPacketRedPoint()
|
2021-05-21 14:47:04 +08:00
|
|
|
local list=MyGuildManager.GetMyGuidRedPackage()
|
2021-06-01 16:59:27 +08:00
|
|
|
if list and LengthOfTable(list)>0 then
|
2021-05-21 14:47:04 +08:00
|
|
|
for key, value in pairs(list) do
|
2021-05-25 14:52:02 +08:00
|
|
|
if value and value.num and value.num>0 then
|
2021-05-21 14:47:04 +08:00
|
|
|
return true
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
return false
|
|
|
|
end
|
|
|
|
function this.CheckIsCanGetPackage()
|
2021-06-01 16:59:27 +08:00
|
|
|
if MyGuildManager.GetRedPackageNum()>0 then
|
|
|
|
--Game.GlobalEvent:DispatchEvent(GameEvent.Chat.OnRedPackageNumChanged,true)
|
|
|
|
local aaa=Util.GetGameObject(UIManager.uiNode,"GuildMainCityPanel/ChatTipView/Image")
|
|
|
|
local bbb=Util.GetGameObject(UIManager.uiNode,"MainPanel/ChatTipView/Image")
|
|
|
|
if aaa then
|
|
|
|
aaa.gameObject:SetActive(true)
|
|
|
|
end
|
|
|
|
if bbb then
|
|
|
|
bbb.gameObject:SetActive(true)
|
|
|
|
end
|
2021-05-21 14:47:04 +08:00
|
|
|
return true
|
2020-05-09 13:31:21 +08:00
|
|
|
else
|
2021-06-01 16:59:27 +08:00
|
|
|
-- Game.GlobalEvent:DispatchEvent(GameEvent.Chat.OnRedPackageNumChanged,false)
|
|
|
|
local aaa=Util.GetGameObject(UIManager.uiNode,"GuildMainCityPanel/ChatTipView/Image")
|
|
|
|
local bbb=Util.GetGameObject(UIManager.uiNode,"MainPanel/ChatTipView/Image")
|
|
|
|
if aaa then
|
|
|
|
aaa.gameObject:SetActive(false)
|
|
|
|
end
|
|
|
|
if bbb then
|
|
|
|
bbb.gameObject:SetActive(false)
|
|
|
|
end
|
2020-05-09 13:31:21 +08:00
|
|
|
return false
|
|
|
|
end
|
2021-06-01 16:59:27 +08:00
|
|
|
|
|
|
|
return false
|
2020-05-09 13:31:21 +08:00
|
|
|
end
|
|
|
|
|
2021-05-21 14:47:04 +08:00
|
|
|
|
2020-06-23 18:36:24 +08:00
|
|
|
return this
|