社稷大点领取奖励后宝箱状态修改
parent
e27057ed9c
commit
7fe83b0cea
|
@ -155,7 +155,11 @@ function SheJiDaDian:BindEvent()
|
|||
|
||||
Util.AddOnceClick(this.btnBox,function ()
|
||||
DynamicActivityManager.SetCurLevel(math.floor(curScore/(actReward[1].Values[2][1])))
|
||||
UIManager.OpenPanel(UIName.GeneralRewardPopup,1,ActivityTypeDef.Celebration,activityId)
|
||||
UIManager.OpenPanel(UIName.GeneralRewardPopup,1,ActivityTypeDef.Celebration,activityId,function()
|
||||
ActInfo = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.Celebration)--活动数据
|
||||
activityId = ActInfo.activityId
|
||||
this:RefreshRewardBox()
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ local ActivityType = nil
|
|||
|
||||
local ActInfo = {}
|
||||
local ActReward = {}
|
||||
local func
|
||||
|
||||
local sortingOrder=0
|
||||
function GeneralRewardPopup:InitComponent()
|
||||
|
@ -60,7 +61,7 @@ function GeneralRewardPopup:OnSortingOrderChange()
|
|||
end
|
||||
|
||||
--rewardType==1 是一般奖励,配在ActivityRewardConfig中的,234567是配在特殊表里的
|
||||
function GeneralRewardPopup:OnOpen(rewardType,activityType,activityId)
|
||||
function GeneralRewardPopup:OnOpen(rewardType,activityType,activityId,_func)
|
||||
curRewardType = rewardType
|
||||
if rewardType == 1 then
|
||||
ActivityType = activityType
|
||||
|
@ -69,7 +70,9 @@ function GeneralRewardPopup:OnOpen(rewardType,activityType,activityId)
|
|||
elseif rewardType == 2 then
|
||||
-- body
|
||||
end
|
||||
|
||||
if _func then
|
||||
func = _func
|
||||
end
|
||||
end
|
||||
|
||||
function GeneralRewardPopup:OnShow()
|
||||
|
@ -78,11 +81,15 @@ end
|
|||
|
||||
function GeneralRewardPopup:OnClose()
|
||||
Game.GlobalEvent:DispatchEvent(GameEvent.DynamicTask.OnGetReward)
|
||||
if func then
|
||||
func()
|
||||
func = nil
|
||||
end
|
||||
end
|
||||
|
||||
function GeneralRewardPopup:OnDestroy()
|
||||
this.scrollView=nil
|
||||
itemList={}
|
||||
itemList = {}
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue