三界降魔

dev_chengFeng
ZhangBiao 2020-10-02 00:18:17 +08:00 committed by JieLing
parent 97f9b8f671
commit def3e829ff
2 changed files with 22 additions and 16 deletions

View File

@ -35,7 +35,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: -340, y: 0.000061035156}
m_SizeDelta: {x: 152, y: 152}
m_SizeDelta: {x: 120, y: 120}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &5649482003827015692
CanvasRenderer:
@ -552,8 +552,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 69.68, y: -3.2}
m_SizeDelta: {x: 752.56, y: 180}
m_AnchoredPosition: {x: 94.2, y: -3.2}
m_SizeDelta: {x: 700, y: 150}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &5231672218216622282
MonoBehaviour:
@ -572,7 +572,7 @@ MonoBehaviour:
m_Right: 0
m_Top: 0
m_Bottom: 0
m_ChildAlignment: 5
m_ChildAlignment: 3
m_Spacing: 0
m_ChildForceExpandWidth: 0
m_ChildForceExpandHeight: 0
@ -1204,7 +1204,7 @@ MonoBehaviour:
m_HorizontalOverflow: 1
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: "\u672A\u4E0A\u699C"
m_Text: 2
LanguageIndex: 0
--- !u!1 &5010477071449866921
GameObject:
@ -1380,7 +1380,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 201.7, y: 0}
m_AnchoredPosition: {x: 210, y: 0}
m_SizeDelta: {x: 215.13, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6670049880329292574
@ -1418,7 +1418,7 @@ MonoBehaviour:
m_BestFit: 0
m_MinSize: 3
m_MaxSize: 40
m_Alignment: 4
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 1
@ -1888,7 +1888,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -16.9, y: -509.9}
m_AnchoredPosition: {x: -65, y: -509.9}
m_SizeDelta: {x: 178.71, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4328113148135187130
@ -2288,7 +2288,7 @@ RectTransform:
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 0, y: 0.5}
m_AnchoredPosition: {x: -340, y: 0.000061035156}
m_SizeDelta: {x: 220, y: 120}
m_SizeDelta: {x: 200, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &373819585501442330
CanvasRenderer:

View File

@ -160,6 +160,7 @@ function DemonSlayerPanel:SetState(ActInfo)
state = 0--7天内
else
state = 1--2天内
this.time:GetComponent("Text").text = "距离活动结束:"
end
-- else
-- self:ClosePanel()
@ -244,12 +245,12 @@ end
function DemonSlayerPanel:SetTime(ActInfo)
local extraTime = ConfigManager.GetConfigData(ConfigName.GlobalActivity,ActInfo.activityId).GapTime*86400
--设置一进去的时间,不设置的话一进去会不对
this.time:SetActive(state == 0)
-- this.time:SetActive(state == 0)
local time = ActInfo.endTime - GetTimeStamp() - extraTime
if time > 86400 then
this.leftTime.text = TimeToDH(time)
if time > 3600 then
this.leftTime.text = TimeToDHM(time)
else
this.leftTime.text = TimeToHMS(time)
this.leftTime.text = TimeToMS(time)
end
if self.timer then
@ -260,10 +261,10 @@ function DemonSlayerPanel:SetTime(ActInfo)
self.timer = Timer.New(function ()
if state == 0 then
local time = ActInfo.endTime - GetTimeStamp() - extraTime
if time > 86400 then
this.leftTime.text = TimeToDH(time)
if time > 3600 then
this.leftTime.text = TimeToDHM(time)
else
this.leftTime.text = TimeToHMS(time)
this.leftTime.text = TimeToMS(time)
end
time = time -1
if time <= 0 then
@ -271,6 +272,11 @@ function DemonSlayerPanel:SetTime(ActInfo)
end
elseif state == 1 then
local time = ActInfo.endTime - GetTimeStamp()
if time > 3600 then
this.leftTime.text = TimeToDHM(time)
else
this.leftTime.text = TimeToMS(time)
end
time = time -1
if time <= 0 then
if self.timer then