|
@@ -155,6 +155,10 @@ namespace GFGGame
|
|
|
if (actLimitTsyOpen)// && LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_2
|
|
|
Timers.inst.Add(1, 0, UpdateTime);
|
|
|
|
|
|
+ //第二个活动的模拟活动倒计时
|
|
|
+ if (!actLimitTsyOpen && boxId == LuckyBoxDataManager.BOX_ID_2)
|
|
|
+ Timers.inst.Add(1, 0, UpdateImitateTime);
|
|
|
+
|
|
|
Timers.inst.AddUpdate(CheckGuide);
|
|
|
}
|
|
|
|
|
@@ -175,6 +179,13 @@ namespace GFGGame
|
|
|
comBox.m_showActivityType.selectedIndex = 1;
|
|
|
UpGiftBox(comBox);
|
|
|
}
|
|
|
+ else if (boxId == LuckyBoxDataManager.BOX_ID_2) {
|
|
|
+ long endTime = TimeUtil.DateTimeToTimestamp("[2024][1][28][05:00]");
|
|
|
+ if (endTime < TimeHelper.ServerNow())
|
|
|
+ comBox.m_showActivityType.selectedIndex = 0;
|
|
|
+ else
|
|
|
+ comBox.m_showActivityType.selectedIndex = 2;
|
|
|
+ }
|
|
|
else
|
|
|
comBox.m_showActivityType.selectedIndex = 0;
|
|
|
|
|
@@ -431,6 +442,21 @@ namespace GFGGame
|
|
|
textField.asTextField.text = string.Format("轮换倒计时:{0}", strTime);
|
|
|
}
|
|
|
|
|
|
+ private void UpdateImitateTime(object param = null)
|
|
|
+ {
|
|
|
+ GObject item = _ui.m_listBg.GetChildAt(1);
|
|
|
+ GObject textField = item.asCom.GetChild("txtHasTime");
|
|
|
+ if (textField == null) return;
|
|
|
+ long curTime = TimeHelper.ServerNow();
|
|
|
+ long endTime = TimeUtil.DateTimeToTimestamp("[2024][1][28][05:00]");
|
|
|
+ if (endTime < curTime)
|
|
|
+ {
|
|
|
+ Timers.inst.Remove(UpdateImitateTime);
|
|
|
+ endTime = curTime;
|
|
|
+ }
|
|
|
+ textField.asTextField.text = "剩余时间: " + TimeUtil.FormattingTimeTo_DDHHmm(endTime - curTime);
|
|
|
+ }
|
|
|
+
|
|
|
private void UpdateTime(object param = null)
|
|
|
{
|
|
|
GObject item = _ui.m_listBg.GetChildAt(1);
|
|
@@ -570,6 +596,7 @@ namespace GFGGame
|
|
|
|
|
|
Timers.inst.Remove(CheckTime);
|
|
|
Timers.inst.Remove(UpdateTime);
|
|
|
+ Timers.inst.Remove(UpdateImitateTime);
|
|
|
Timers.inst.Remove(CheckGuide);
|
|
|
Debug.Log("OnHide: LuckyBoxView");
|
|
|
}
|