|
@@ -174,8 +174,22 @@ namespace GFGGame
|
|
|
btnPreview.data = boxId;
|
|
|
|
|
|
obj.data = boxId;
|
|
|
+
|
|
|
+ if (boxId == 1)
|
|
|
+ {
|
|
|
+ long endTime = LuckyBoxDataManager.Instance.endTime;
|
|
|
+ long curTime = TimeHelper.ServerNow();
|
|
|
+ TimeUtil.FormattingTime(curTime, endTime, out int num, out string str);
|
|
|
+ (obj as GComponent).GetChild("txtTime").asTextField.text = string.Format("剩余{0}{1}", num, str);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+ // private void UpdateTime(object param)
|
|
|
+ // {
|
|
|
+ // GTextField txtTime = _ui.m_listBg.GetChildAt(0).asCom.GetChild("txtTime").asTextField;
|
|
|
+ // txtTime.text = TimeUtil.FormattingTime(LuckyBoxDataManager.Instance.startTime, LuckyBoxDataManager.Instance.startTime);
|
|
|
+ // }
|
|
|
+
|
|
|
private void UpdateBg(object param)
|
|
|
{
|
|
|
string[] resArr = LuckyBoxCfgArray.Instance.GetCfg(LuckyBoxDataManager.Instance.currentBoxId).resArr;
|
|
@@ -227,8 +241,8 @@ namespace GFGGame
|
|
|
long endTime = LuckyBoxDataManager.Instance.endTime;
|
|
|
long curTime = TimeHelper.ServerNow();
|
|
|
TimeUtil.FormattingTime(curTime, endTime, out int num, out string str);
|
|
|
- _ui.m_listBg.GetChildAt(0).asCom.GetChild("txtTime").asTextField.text = string.Format("{0}", num);
|
|
|
- _ui.m_listBg.GetChildAt(0).asCom.GetChild("txtTimeStr").asTextField.text = string.Format("{0}", str);
|
|
|
+ _ui.m_listBg.GetChildAt(0).asCom.GetChild("txtTime").asTextField.text = string.Format("剩余{0}{1}", num, str);
|
|
|
+ // _ui.m_listBg.GetChildAt(0).asCom.GetChild("txtTimeStr").asTextField.text = string.Format("{0}", str);
|
|
|
}
|
|
|
private void updateBoxEffect()
|
|
|
{
|
|
@@ -280,7 +294,6 @@ namespace GFGGame
|
|
|
{
|
|
|
ViewManager.Show(ViewName.LUCKY_BOX_STAR_VIEW, null, new object[] { ViewName.LUCKY_BOX_VIEW, boxId });
|
|
|
LogServerHelper.SendNodeLog((int)PlayParticipationEnum.ZAI_XING, 2);
|
|
|
-
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -318,6 +331,7 @@ namespace GFGGame
|
|
|
Timers.inst.Remove(CheckTime);
|
|
|
Timers.inst.Remove(UpdateBg);
|
|
|
Timers.inst.Remove(CheckGuide);
|
|
|
+ // Timers.inst.Remove(UpdateTime);
|
|
|
}
|
|
|
protected override void RemoveEventListener()
|
|
|
{
|