【福星高照】完成

dev_chengFeng
ZhangBiao 2021-03-30 16:55:45 +08:00
parent ee778776a1
commit d3d363762b
2 changed files with 7 additions and 4 deletions

View File

@ -33,14 +33,14 @@ function this.UpdataRewardData()
if not ActData then return end
Data.activityId = ActData.activityId
Data.ActState = ActData.value
LogPink("礼包状态:"..tostring(ActData.value))
-- LogPink("礼包状态:"..tostring(ActData.value))
Data.startTime = ActData.startTime
table.sort(ActData.mission, function(a, b)
return a.missionId < b.missionId
end)
for key, value in pairs(ActData.mission) do
if Data.rewards[key] then
LogGreen("key:"..tostring(key).." "..tostring(value.missionId).." "..tostring(value.state).." "..tostring(value.progress))
-- LogGreen("key:"..tostring(key).." "..tostring(value.missionId).." "..tostring(value.state).." "..tostring(value.progress))
Data.rewards[key].missionId = value.missionId
Data.rewards[key].State = value.state
Data.rewards[key].Progress = value.progress
@ -58,12 +58,12 @@ function this.CheckRedPoint()
if Data.ActState == 1 then
for i = 1, #Data.rewards do
if Data.rewards[i].State == 0 and Data.rewards[i].Progress <= GetTimeStamp() then
LogBlue("Return true")
-- LogBlue("Return true")
return true
end
end
end
LogBlue("Return false")
-- LogBlue("Return false")
return false
end

View File

@ -21,6 +21,7 @@ function FuXingGaoZhao:InitComponent()
end
end
self.gift = ConfigManager.GetConfigDataByKey(ConfigName.StoreConfig,"Id",11001)
self.UpView = SubUIManager.Open(SubUIConfig.UpView, self.gameObject.transform, { showType = UpViewOpenType.ShowLeft})
end
--绑定事件(用于子类重写)
function FuXingGaoZhao:BindEvent()
@ -68,6 +69,7 @@ end
--界面打开时调用(用于子类重写)
function FuXingGaoZhao:OnOpen()
self.UpView:OnOpen({ showType = UpViewOpenType.ShowLeft, panelType = PanelType.Main})
end
-- 打开,重新打开时回调
@ -152,6 +154,7 @@ function FuXingGaoZhao:OnDestroy()
self.timer = nil
end
itemPreList={}
SubUIManager.Close(self.UpView)
end
return FuXingGaoZhao