Browse Source

抽卡报错

zhaoyang 2 years ago
parent
commit
bb4174986c
1 changed files with 11 additions and 8 deletions
  1. 11 8
      GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

+ 11 - 8
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -243,21 +243,24 @@ namespace GFGGame
             _ui.m_btnLeft.grayed = _curIndex <= 0;
             _ui.m_btnRight.grayed = _curIndex >= _ui.m_listBg.numItems - 1;
 
-            if (LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1)
-            {
-                Timers.inst.Add(1, 0, CheckTime);
-            }
-            else
-            {
-                Timers.inst.Remove(CheckTime);
-            }
+            // if (LuckyBoxDataManager.Instance.currentBoxId == LuckyBoxDataManager.BOX_ID_1)
+            // {
+            //     Timers.inst.Add(1, 0, CheckTime);
+            // }
+            // else
+            // {
+            //     Timers.inst.Remove(CheckTime);
+            // }
         }
 
         private void CheckTime(object param = null)
         {
+            if (LuckyBoxDataManager.Instance.currentBoxId != LuckyBoxDataManager.BOX_ID_1) return;
             long endTime = LuckyBoxDataManager.Instance.endTime;
             long curTime = TimeHelper.ServerNow();
             TimeUtil.FormattingTime(curTime, endTime, out int num, out string str);
+            ET.Log.Debug("luckybox   _ui:" + _ui);
+            ET.Log.Debug("luckybox   _ui.m_listBg:" + _ui.m_listBg);
             GObject item = _ui.m_listBg.GetChildAt(0);
             if (item == null) return;
             GObject textField = item.asCom.GetChild("txtTime");