local AnniversaryLuckyDraw_Controller = {} local private = {} local EventSystem = require('Event/EventSystem') AnniversaryLuckyDraw_Controller.DrawTimesGetType = { SceneQuiz = 1, --一站到底 NewYearPray = 2, --福袋祈愿 DailyActivation = 3 --活跃度 } AnniversaryLuckyDraw_Controller.PublicityType = { Normal = 0, --普通奖励 Middle = 1, --中级奖励 Senior = 2 --高级奖励 } AnniversaryLuckyDraw_Controller.LuckyFishUIOpenType = { Default = 0, --默认点击打开 Draw = 1, --中奖打开 NotDraw = 2 --未中奖打开 } function AnniversaryLuckyDraw_Controller.OnStartup() EventSystem.Regist(EventID.FunctionUnlockUpdate, private.RefreshInfoByFunction) EventSystem.Regist(EventID.UI_OperationActivity_InfoChanged, private.CheckFuncOpenIssue) private.ActivityType = MDL.OperationActivity.ActivityType.NewYear end --GMS开关变化时刷新 function private.RefreshInfoByFunction(funcId, isUnlock) if funcId == MDL.Unlock.FunctionType.AnniversaryLuckyDraw then if not isUnlock then UIManager.CloseView(Const_UI_Lua.UIEnum.UIAnniversaryLuckyDrawMain) AnniversaryLuckyDraw_Controller.CloseAllPopUpUI() end end end function AnniversaryLuckyDraw_Controller.CloseAllPopUpUI() UIManager.CloseView(Const_UI_Lua.UIEnum.UIAnniversaryLuckyDrawGachaResourcePanel) UIManager.CloseView(Const_UI_Lua.UIEnum.UIAnniversaryLuckyDrawListPanel) UIManager.CloseView(Const_UI_Lua.UIEnum.UIAnniversaryLuckyDrawRewardListPanel) UIManager.CloseView(Const_UI_Lua.UIEnum.UIAnniversaryLuckyDrawJackpotListPanel) UIManager.CloseView(Const_UI_Lua.UIEnum.UIAnniversaryLuckyDrawRewardGainPanel) end function private.CheckFuncOpenIssue() if CTL.OperationActivity.IsOperationActivityTypeOpen(private.ActivityType) and CTL.OperationActivity.IsOperationActivityTypeUnlock(private.ActivityType) and MDL.Unlock.IsUnlock(MDL.Unlock.FunctionType.NewYear) and MDL.Unlock.IsUnlock(MDL.Unlock.FunctionType.AnniversaryLuckyDraw) then return end if UIManager.IsViewOpened(Const_UI_Lua.UIEnum.UIAnniversaryLuckyDrawMain) then UIManager.CloseView(Const_UI_Lua.UIEnum.UIAnniversaryLuckyDrawMain) AnniversaryLuckyDraw_Controller.CloseAllPopUpUI() end end return AnniversaryLuckyDraw_Controller