【福星高照】提交
parent
8796bf4957
commit
ee778776a1
|
@ -5561,7 +5561,7 @@ RectTransform:
|
|||
m_GameObject: {fileID: 2031146696097563613}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 100}
|
||||
m_LocalScale: {x: 0.00375, y: 0.00375, z: 0.00375}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 7647332143288692316}
|
||||
m_Father: {fileID: 6059736030603862039}
|
||||
|
@ -10416,7 +10416,7 @@ RectTransform:
|
|||
m_GameObject: {fileID: 2676605576287313200}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 100}
|
||||
m_LocalScale: {x: 0.00375, y: 0.00375, z: 0.00375}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 152591371637129086}
|
||||
m_Father: {fileID: 8020054320884601061}
|
||||
|
@ -15616,7 +15616,7 @@ RectTransform:
|
|||
m_GameObject: {fileID: 3216812134330841999}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 100}
|
||||
m_LocalScale: {x: 0.00375, y: 0.00375, z: 0.00375}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 4112488450902725533}
|
||||
m_Father: {fileID: 8476440336634998172}
|
||||
|
@ -25281,7 +25281,7 @@ RectTransform:
|
|||
m_GameObject: {fileID: 3820070998757264061}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 100}
|
||||
m_LocalScale: {x: 0.00375, y: 0.00375, z: 0.00375}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 8013693750714093904}
|
||||
m_Father: {fileID: 3580916268178109759}
|
||||
|
@ -25569,7 +25569,7 @@ RectTransform:
|
|||
m_GameObject: {fileID: 4399116132758680652}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 100}
|
||||
m_LocalScale: {x: 0.00375, y: 0.00375, z: 0.00375}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 4345952814749043799}
|
||||
m_Father: {fileID: 2363736995563706436}
|
||||
|
@ -30661,7 +30661,7 @@ RectTransform:
|
|||
m_GameObject: {fileID: 4988448459177450199}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 100}
|
||||
m_LocalScale: {x: 0.00375, y: 0.00375, z: 0.00375}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 142252015247782015}
|
||||
m_Father: {fileID: 8306614433853021962}
|
||||
|
@ -35508,7 +35508,7 @@ RectTransform:
|
|||
m_GameObject: {fileID: 5703841272996217319}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 100}
|
||||
m_LocalScale: {x: 0.00375, y: 0.00375, z: 0.00375}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 5649409314763706158}
|
||||
m_Father: {fileID: 563862424915744807}
|
||||
|
|
|
@ -7,11 +7,12 @@ end
|
|||
|
||||
function this.InitRewardData()
|
||||
local ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.FuXingGaoZhao)
|
||||
if not ActData then return end
|
||||
local configData = ConfigManager.GetAllConfigsDataByKey(ConfigName.ActivityRewardConfig,"ActivityId",ActData.activityId)
|
||||
local actSingleData = ConfigManager.GetConfigDataByKey(ConfigName.GlobalActivity,"Id",ActData.activityId)
|
||||
Data.activityId = ActData.activityId
|
||||
Data.ActState = ActData.value
|
||||
Data.endTime = ActData.endTime
|
||||
Data.startTime = ActData.startTime
|
||||
Data.rewards = {}
|
||||
-- LogYellow("表数据数量:"..tostring(#configData))
|
||||
for key, value in pairs(configData) do
|
||||
|
@ -29,10 +30,14 @@ end
|
|||
|
||||
function this.UpdataRewardData()
|
||||
local ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.FuXingGaoZhao)
|
||||
if not ActData then return end
|
||||
Data.activityId = ActData.activityId
|
||||
Data.ActState = ActData.value
|
||||
LogPink("礼包状态:"..tostring(ActData.value))
|
||||
Data.endTime = ActData.endTime
|
||||
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))
|
||||
|
@ -51,12 +56,14 @@ end
|
|||
function this.CheckRedPoint()
|
||||
this.InitRewardData()
|
||||
if Data.ActState == 1 then
|
||||
for i = 1, Data.rewards do
|
||||
if Data.rewards[i].State == 0 and Data.rewards[i].Progress >= GetTimeStamp() then
|
||||
for i = 1, #Data.rewards do
|
||||
if Data.rewards[i].State == 0 and Data.rewards[i].Progress <= GetTimeStamp() then
|
||||
LogBlue("Return true")
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
LogBlue("Return false")
|
||||
return false
|
||||
end
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ local rewardList = {}
|
|||
local itemPreList={} --item预设容器
|
||||
local data
|
||||
|
||||
local timeData = string.split(ConfigManager.GetConfigDataByKey(ConfigName.SpecialConfig,"Id",109).Value,"#")
|
||||
--初始化组件(用于子类重写)
|
||||
function FuXingGaoZhao:InitComponent()
|
||||
self.backBtn = Util.GetGameObject(self.gameObject,"btnBack")
|
||||
|
@ -43,7 +44,7 @@ function FuXingGaoZhao:BindEvent()
|
|||
end)
|
||||
end
|
||||
elseif data.ActState == 1 then
|
||||
NetManager.GetActivityRewardRequest(-1,ActivityTypeDef.FuXingGaoZhao,function (drop)
|
||||
NetManager.GetActivityRewardRequest(-1,data.activityId,function (drop)
|
||||
UIManager.OpenPanel(UIName.RewardItemPopup, drop, 1,function()
|
||||
FuXingGaoZhao:Refresh()
|
||||
end)
|
||||
|
@ -77,6 +78,12 @@ end
|
|||
function FuXingGaoZhao:Refresh()
|
||||
data = FuXingGaoZhaoManager.GetData()
|
||||
FuXingGaoZhao:SetBtn()
|
||||
if data.ActState == 0 then
|
||||
FuXingGaoZhao:SetTime()
|
||||
self.time.gameObject:SetActive(true)
|
||||
else
|
||||
self.time.gameObject:SetActive(false)
|
||||
end
|
||||
for i = 1, #rewardList do
|
||||
FuXingGaoZhao:SetSingleReward(rewardList[i],data.rewards[i],i)
|
||||
end
|
||||
|
@ -86,31 +93,64 @@ function FuXingGaoZhao:SetBtn()
|
|||
local text = Util.GetGameObject(self.getBtn,"Text"):GetComponent("Text")
|
||||
local redPoint = Util.GetGameObject(self.getBtn,"redPoint")
|
||||
if data.ActState == 0 then
|
||||
text.text = "储 值"
|
||||
self.getBtn:SetActive(true)
|
||||
redPoint:SetActive(false)
|
||||
elseif data.ActState == 1 then
|
||||
text.text = Language[11948]
|
||||
local bool = FuXingGaoZhaoManager.CheckRedPoint()
|
||||
self.getBtn:SetActive(bool)
|
||||
redPoint:SetActive(bool)
|
||||
elseif data.ActState == 2 then
|
||||
self.getBtn:SetActive(false)
|
||||
end
|
||||
end
|
||||
|
||||
function FuXingGaoZhao:SetTime()
|
||||
if self.timer then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
local time = data.startTime + tonumber(timeData[1])*86400 - GetTimeStamp()
|
||||
self.time.text = string.format("剩余接受时间:%s",TimeToFelaxible(time))
|
||||
self.timer = Timer.New(function()
|
||||
time = time - 1
|
||||
if time < 1 then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
self:ClosePanel()
|
||||
end
|
||||
self.time.text = string.format("剩余接受时间:%s",TimeToFelaxible(time))
|
||||
end, 1, -1, true)
|
||||
self.timer:Start()
|
||||
end
|
||||
|
||||
function FuXingGaoZhao:SetSingleReward(go,data,index)
|
||||
local reward = Util.GetGameObject(go,"GameObject")
|
||||
local mask = Util.GetGameObject(go,"GameObject")
|
||||
local mask = Util.GetGameObject(go,"mask")
|
||||
-- LogBlue("index:"..index.." go:"..tostring(go.name).." 天数:"..tostring(NumToSimplenessFont[index]))
|
||||
Util.GetGameObject(go,"Text"):GetComponent("Text").text = string.format("第%s天",NumToSimplenessFont[index])
|
||||
if not itemPreList[index] then
|
||||
itemPreList[index] = SubUIManager.Open(SubUIConfig.ItemView,reward.transform)
|
||||
end
|
||||
itemPreList[index]:OnOpen(false, data.Reward, 0.85,false, false, false, sortingOrder)
|
||||
mask:SetActive(data.State == 1)
|
||||
end
|
||||
|
||||
--界面关闭时调用(用于子类重写)
|
||||
function FuXingGaoZhao:OnClose()
|
||||
if self.timer then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
end
|
||||
|
||||
--界面销毁时调用(用于子类重写)
|
||||
function FuXingGaoZhao:OnDestroy()
|
||||
if self.timer then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
itemPreList={}
|
||||
end
|
||||
|
||||
|
|
|
@ -1755,7 +1755,7 @@ function this.CalculateHeroAllProValList(_type, _heroDid, isWar, _breakId, _upSt
|
|||
-- end
|
||||
--end
|
||||
--玩家称号 皮肤 坐骑属性加成
|
||||
local playerDcorateAdd = PlayerManager.CalculatePlayerDcorateProAddVal()
|
||||
-- local playerDcorateAdd = PlayerManager.CalculatePlayerDcorateProAddVal()
|
||||
--if playerDcorateAdd and LengthOfTable(playerDcorateAdd) > 0 then
|
||||
-- for i, v in pairs(playerDcorateAdd) do
|
||||
-- if v > 0 then
|
||||
|
|
|
@ -1045,16 +1045,16 @@ function this.TimeFormat()
|
|||
elseif v.ActId == 6301 then
|
||||
local ActData = ActivityGiftManager.GetActivityTypeInfo(ActivityTypeDef.FuXingGaoZhao)
|
||||
if ActData then
|
||||
activityTabs[k].go.transform.parent.gameObject:SetActive(ActData.value == 0)
|
||||
activityTabs[k].timeText.transform.parent.gameObject:SetActive(ActData.value == 0)
|
||||
activityTabs[k].go.gameObject:SetActive(ActData.value ~= 2)
|
||||
if ActData.value == 0 then
|
||||
local data = string.split(ConfigManager.GetConfigDataByKey(ConfigName.SpecialConfig,"Id",109).Value,"#")
|
||||
local time = ActData.startTime + tonumber(data[1])*86400 - GetTimeStamp()
|
||||
activityTabs[k].timeText.text = TimeToFelaxible(time)
|
||||
end
|
||||
else
|
||||
activityTabs[k].go.gameObject:SetActive(false)
|
||||
end
|
||||
if ActData and ActData.value == 0 then
|
||||
local data = string.split(ConfigManager.GetConfigDataByKey(ConfigName.SpecialConfig,"Id",109).Value,"#")
|
||||
local time = ActData.startTime + tonumber(data[1])*86400 - GetTimeStamp()
|
||||
activityTabs[k].timeText.text = TimeToFelaxible(time)
|
||||
end
|
||||
elseif v.ShowTime == 1 and activityTabs[k].go.gameObject.activeSelf then
|
||||
if v.ActiveType > 0 then
|
||||
local QingLong = ActivityGiftManager.IsActivityTypeOpen(v.ActiveType)
|
||||
|
|
Loading…
Reference in New Issue