破阵诛仙活动 调整
parent
14e58ae443
commit
8c17479fd6
|
@ -609,6 +609,7 @@ RedPointType = {
|
|||
QianKunBox = 2016,--乾坤包囊
|
||||
PoZhenZhuXian = 2017,--破阵诛仙
|
||||
PoZhenZhuXianTask = 20171,--破阵诛仙任务
|
||||
PoZhenZhuXianRecharge = 20172,--破阵诛仙累充
|
||||
|
||||
---聊天相关-----
|
||||
Chat = 207,
|
||||
|
|
|
@ -1143,6 +1143,16 @@ function TimeToDH(second)
|
|||
return string.format(Language[12278],day, hour)
|
||||
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)
|
||||
if not t or t < 0 then
|
||||
|
|
|
@ -16,19 +16,19 @@ local _PageInfo = {--后期可以做成tableInsert,icon名字都去读表
|
|||
},
|
||||
[3] = { --破阵诛仙
|
||||
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] = { --珍奇礼包
|
||||
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] = { --累计充值
|
||||
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] = { --限时商市
|
||||
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
|
||||
|
||||
function PoZhenZhuXianPage:InitComponent(gameObject)
|
||||
itemsGrid = {}--item重复利用
|
||||
singleTaskPre = {}
|
||||
this.time = Util.GetGameObject(gameObject, "content/tiao/time"):GetComponent("Text")
|
||||
this.itemPre = Util.GetGameObject(gameObject, "content/itempre")
|
||||
this.scrollItem = Util.GetGameObject(gameObject, "content/grid")
|
||||
|
@ -64,11 +66,11 @@ function PoZhenZhuXianPage:SetTime()
|
|||
five_timeDown = CalculateSecondsNowTo_N_OClock(5)
|
||||
week_timeDown = endtime - GetTimeStamp()
|
||||
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
|
||||
v.com:GetComponent("Text").text = "剩余:"..TimeToHMS(five_timeDown)
|
||||
v.com:GetComponent("Text").text = "剩余:"..TimeToH(five_timeDown)
|
||||
else
|
||||
v.com:GetComponent("Text").text = "剩余:"..TimeToHMS(week_timeDown)
|
||||
v.com:GetComponent("Text").text = "剩余:"..TimeToDH(week_timeDown)
|
||||
end
|
||||
end
|
||||
this.time.text = "剩余时间:"..TimeToDHMS(week_timeDown)
|
||||
|
@ -80,11 +82,11 @@ function PoZhenZhuXianPage:SetTime()
|
|||
return
|
||||
end
|
||||
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
|
||||
v.com:GetComponent("Text").text = "剩余:"..TimeToHMS(five_timeDown)
|
||||
v.com:GetComponent("Text").text = "剩余:"..TimeToH(five_timeDown)
|
||||
else
|
||||
v.com:GetComponent("Text").text = "剩余:"..TimeToHMS(week_timeDown)
|
||||
v.com:GetComponent("Text").text = "剩余:"..TimeToDH(week_timeDown)
|
||||
end
|
||||
end
|
||||
this.time.text = "剩余时间:"..TimeToDHMS(week_timeDown)
|
||||
|
@ -213,15 +215,15 @@ function PoZhenZhuXianPage:OnDestroy()
|
|||
self.timer = nil
|
||||
end
|
||||
sortingOrder = 0
|
||||
if singleTaskPre then
|
||||
singleTaskPre = {}
|
||||
end
|
||||
|
||||
singleTaskPre = {}
|
||||
itemsGrid = {}
|
||||
end
|
||||
|
||||
function PoZhenZhuXianPage:OnHide()
|
||||
sortingOrder = 0
|
||||
if self.timer then
|
||||
self.timer:Stop()
|
||||
self.timer = nil
|
||||
end
|
||||
end
|
||||
--- 将一段时间转换为天时分秒
|
||||
function PoZhenZhuXianPage:TimeToDHMS(second)
|
||||
|
|
|
@ -387,6 +387,7 @@ function this.RegisterRedCheckFunc()
|
|||
RPData:AddCheckFunc(RedPointType.TimeLimited,OperatingManager.GetTimeLimitRedPointStatus)
|
||||
RPData:AddCheckFunc(RedPointType.QianKunBox,OperatingManager.GetQiankunBoxRedPointStatus)
|
||||
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.HeroExplore, CarbonManager.CarbonRedCheck,FUNCTION_OPEN_TYPE.DAILYCHALLENGE_COIN)
|
||||
|
|
Loading…
Reference in New Issue