破阵诛仙活动 调整
parent
14e58ae443
commit
8c17479fd6
|
@ -609,6 +609,7 @@ RedPointType = {
|
||||||
QianKunBox = 2016,--乾坤包囊
|
QianKunBox = 2016,--乾坤包囊
|
||||||
PoZhenZhuXian = 2017,--破阵诛仙
|
PoZhenZhuXian = 2017,--破阵诛仙
|
||||||
PoZhenZhuXianTask = 20171,--破阵诛仙任务
|
PoZhenZhuXianTask = 20171,--破阵诛仙任务
|
||||||
|
PoZhenZhuXianRecharge = 20172,--破阵诛仙累充
|
||||||
|
|
||||||
---聊天相关-----
|
---聊天相关-----
|
||||||
Chat = 207,
|
Chat = 207,
|
||||||
|
|
|
@ -1143,6 +1143,16 @@ function TimeToDH(second)
|
||||||
return string.format(Language[12278],day, hour)
|
return string.format(Language[12278],day, hour)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
--- 将一段时间转换为时
|
||||||
|
function TimeToH(second)
|
||||||
|
local day = math.floor(second / (24 * 3600))
|
||||||
|
local minute = math.floor(second / 60) % 60
|
||||||
|
local sec = second % 60
|
||||||
|
local hour = math.floor(math.floor(second - day * 24 * 3600 - sec - minute * 60) / 3600)
|
||||||
|
return string.format("%02d时", hour)
|
||||||
|
end
|
||||||
|
|
||||||
--- 将一段时间转换为时分秒
|
--- 将一段时间转换为时分秒
|
||||||
function TimeToHMS(t)
|
function TimeToHMS(t)
|
||||||
if not t or t < 0 then
|
if not t or t < 0 then
|
||||||
|
|
|
@ -16,19 +16,19 @@ local _PageInfo = {--后期可以做成tableInsert,icon名字都去读表
|
||||||
},
|
},
|
||||||
[3] = { --破阵诛仙
|
[3] = { --破阵诛仙
|
||||||
default = "p_pozhengzhuxian_anniu_02", lock = "p_pozhengzhuxian_anniu_02", select = "p_pozhengzhuxian_anniu_01",
|
default = "p_pozhengzhuxian_anniu_02", lock = "p_pozhengzhuxian_anniu_02", select = "p_pozhengzhuxian_anniu_01",
|
||||||
rpType = RedPointType.PoZhenZhuXianTask,panelType = PanelType.QianKunBox,
|
rpType = RedPointType.PoZhenZhuXianTask,panelType = PanelType.Main,
|
||||||
},
|
},
|
||||||
[4] = { --珍奇礼包
|
[4] = { --珍奇礼包
|
||||||
default = "z_zhenqibaoge_anniu_02", lock = "z_zhenqibaoge_anniu_02", select = "z_zhenqibaoge_anniu_01",
|
default = "z_zhenqibaoge_anniu_02", lock = "z_zhenqibaoge_anniu_02", select = "z_zhenqibaoge_anniu_01",
|
||||||
rpType = RedPointType.QianKunBox,panelType = PanelType.QianKunBox,
|
rpType = "",panelType = PanelType.Main,
|
||||||
},
|
},
|
||||||
[5] = { --累计充值
|
[5] = { --累计充值
|
||||||
default = "r_huodong_leijichengzhianniu_01", lock = "r_huodong_leijichengzhianniu_01", select = "r_huodong_leijichengzhianniu",
|
default = "r_huodong_leijichengzhianniu_01", lock = "r_huodong_leijichengzhianniu_01", select = "r_huodong_leijichengzhianniu",
|
||||||
rpType = RedPointType.QianKunBox,panelType = PanelType.QianKunBox,
|
rpType = RedPointType.PoZhenZhuXianRecharge,panelType = PanelType.Main,
|
||||||
},
|
},
|
||||||
[6] = { --限时商市
|
[6] = { --限时商市
|
||||||
default = "x_xianshishangshi_anniu_02", lock = "x_xianshishangshi_anniu_02", select = "x_xianshishangshi_anniu_01",
|
default = "x_xianshishangshi_anniu_02", lock = "x_xianshishangshi_anniu_02", select = "x_xianshishangshi_anniu_01",
|
||||||
rpType = RedPointType.QianKunBox,panelType = PanelType.QianKunBox,
|
rpType = "",panelType = PanelType.Main,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,8 @@ function PoZhenZhuXianPage:ctor(mainPanel, gameObject)
|
||||||
end
|
end
|
||||||
|
|
||||||
function PoZhenZhuXianPage:InitComponent(gameObject)
|
function PoZhenZhuXianPage:InitComponent(gameObject)
|
||||||
|
itemsGrid = {}--item重复利用
|
||||||
|
singleTaskPre = {}
|
||||||
this.time = Util.GetGameObject(gameObject, "content/tiao/time"):GetComponent("Text")
|
this.time = Util.GetGameObject(gameObject, "content/tiao/time"):GetComponent("Text")
|
||||||
this.itemPre = Util.GetGameObject(gameObject, "content/itempre")
|
this.itemPre = Util.GetGameObject(gameObject, "content/itempre")
|
||||||
this.scrollItem = Util.GetGameObject(gameObject, "content/grid")
|
this.scrollItem = Util.GetGameObject(gameObject, "content/grid")
|
||||||
|
@ -64,11 +66,11 @@ function PoZhenZhuXianPage:SetTime()
|
||||||
five_timeDown = CalculateSecondsNowTo_N_OClock(5)
|
five_timeDown = CalculateSecondsNowTo_N_OClock(5)
|
||||||
week_timeDown = endtime - GetTimeStamp()
|
week_timeDown = endtime - GetTimeStamp()
|
||||||
for k,v in pairs(singleTaskPre) do
|
for k,v in pairs(singleTaskPre) do
|
||||||
v.com.gameObject:SetActive(true)
|
-- v.com.gameObject:SetActive(true)
|
||||||
if v and v.data.type == 1 then
|
if v and v.data.type == 1 then
|
||||||
v.com:GetComponent("Text").text = "剩余:"..TimeToHMS(five_timeDown)
|
v.com:GetComponent("Text").text = "剩余:"..TimeToH(five_timeDown)
|
||||||
else
|
else
|
||||||
v.com:GetComponent("Text").text = "剩余:"..TimeToHMS(week_timeDown)
|
v.com:GetComponent("Text").text = "剩余:"..TimeToDH(week_timeDown)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
this.time.text = "剩余时间:"..TimeToDHMS(week_timeDown)
|
this.time.text = "剩余时间:"..TimeToDHMS(week_timeDown)
|
||||||
|
@ -80,11 +82,11 @@ function PoZhenZhuXianPage:SetTime()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
for k,v in pairs(singleTaskPre) do
|
for k,v in pairs(singleTaskPre) do
|
||||||
v.com.gameObject:SetActive(true)
|
-- v.com.gameObject:SetActive(true)
|
||||||
if v and v.data.type == 1 then
|
if v and v.data.type == 1 then
|
||||||
v.com:GetComponent("Text").text = "剩余:"..TimeToHMS(five_timeDown)
|
v.com:GetComponent("Text").text = "剩余:"..TimeToH(five_timeDown)
|
||||||
else
|
else
|
||||||
v.com:GetComponent("Text").text = "剩余:"..TimeToHMS(week_timeDown)
|
v.com:GetComponent("Text").text = "剩余:"..TimeToDH(week_timeDown)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
this.time.text = "剩余时间:"..TimeToDHMS(week_timeDown)
|
this.time.text = "剩余时间:"..TimeToDHMS(week_timeDown)
|
||||||
|
@ -213,15 +215,15 @@ function PoZhenZhuXianPage:OnDestroy()
|
||||||
self.timer = nil
|
self.timer = nil
|
||||||
end
|
end
|
||||||
sortingOrder = 0
|
sortingOrder = 0
|
||||||
if singleTaskPre then
|
singleTaskPre = {}
|
||||||
singleTaskPre = {}
|
|
||||||
end
|
|
||||||
|
|
||||||
itemsGrid = {}
|
itemsGrid = {}
|
||||||
end
|
end
|
||||||
|
|
||||||
function PoZhenZhuXianPage:OnHide()
|
function PoZhenZhuXianPage:OnHide()
|
||||||
sortingOrder = 0
|
if self.timer then
|
||||||
|
self.timer:Stop()
|
||||||
|
self.timer = nil
|
||||||
|
end
|
||||||
end
|
end
|
||||||
--- 将一段时间转换为天时分秒
|
--- 将一段时间转换为天时分秒
|
||||||
function PoZhenZhuXianPage:TimeToDHMS(second)
|
function PoZhenZhuXianPage:TimeToDHMS(second)
|
||||||
|
|
|
@ -387,6 +387,7 @@ function this.RegisterRedCheckFunc()
|
||||||
RPData:AddCheckFunc(RedPointType.TimeLimited,OperatingManager.GetTimeLimitRedPointStatus)
|
RPData:AddCheckFunc(RedPointType.TimeLimited,OperatingManager.GetTimeLimitRedPointStatus)
|
||||||
RPData:AddCheckFunc(RedPointType.QianKunBox,OperatingManager.GetQiankunBoxRedPointStatus)
|
RPData:AddCheckFunc(RedPointType.QianKunBox,OperatingManager.GetQiankunBoxRedPointStatus)
|
||||||
RPData:SetParent(RedPointType.PoZhenZhuXianTask, OperatingManager.CheckPoZhenZhuXianTaskRed)
|
RPData:SetParent(RedPointType.PoZhenZhuXianTask, OperatingManager.CheckPoZhenZhuXianTaskRed)
|
||||||
|
RPData:SetParent(RedPointType.PoZhenZhuXianRecharge, OperatingManager.CheckLeiJiChongZhiRedData)
|
||||||
|
|
||||||
RPData:AddCheckFunc(RedPointType.OrdinaryExplore, CarbonManager.CarbonRedCheck,FUNCTION_OPEN_TYPE.EXPEDITION)
|
RPData:AddCheckFunc(RedPointType.OrdinaryExplore, CarbonManager.CarbonRedCheck,FUNCTION_OPEN_TYPE.EXPEDITION)
|
||||||
RPData:AddCheckFunc(RedPointType.HeroExplore, CarbonManager.CarbonRedCheck,FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN)
|
RPData:AddCheckFunc(RedPointType.HeroExplore, CarbonManager.CarbonRedCheck,FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN)
|
||||||
|
|
Loading…
Reference in New Issue