浏览代码

摘星防止点击过快造成卡顿补充

huangxiaoyue 1 年之前
父节点
当前提交
507324681e
共有 1 个文件被更改,包括 7 次插入3 次删除
  1. 7 3
      GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusShowView.cs

+ 7 - 3
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusShowView.cs

@@ -116,9 +116,13 @@ namespace GFGGame
 
         protected void ReferNextShow()
         {
+            if (GetSuitItemController.isAuto)
+                return;
+
             int suitId = 0;
             if(_itemIdList.ContainsKey(_chooseIndex))
                 suitId = SuitCfgArray.Instance.GetSuitIdOfItem(_itemIdList[_chooseIndex]);
+
             if (_chooseIndex != -1 && suitId > 0)
                 ClickItem(_chooseIndex);
             else
@@ -126,7 +130,6 @@ namespace GFGGame
                 if (_handClick)
                 {
                     _handClick = false;
-                    Timers.inst.Remove(UpClickDataTime);
                     _ui.m_touchFlipOpen.touchable = false;
                 }
             }
@@ -142,6 +145,7 @@ namespace GFGGame
             _recordTurnIndex.Clear();
             _ui.m_BtnPass.visible = true;
             _ui.m_touchFlipOpen.touchable = false;
+            GetSuitItemController.isAuto = false;
 
             if (_rewardList.Count == 1)
             {
@@ -166,6 +170,7 @@ namespace GFGGame
             Timers.inst.Remove(UpDataTime);
             Timers.inst.Remove(UpClickDataTime);
             Timers.inst.Remove(touchFlipOpen);
+            GetSuitItemController.isAuto = false;
 
             foreach (var v in _effectUIDic)
             {
@@ -284,9 +289,9 @@ namespace GFGGame
         private void UpClickDataTime(object param = null)
         {
             int index = (int)param;
+            Timers.inst.Remove(UpClickDataTime);
             if (_recordTurnIndex.Contains(index) && _recordOpenIndex.Contains(index))
             {
-                Timers.inst.Remove(UpClickDataTime);
                 HideOtherShowWindow();
                 _ui.m_touchFlipOpen.touchable = false;
             }
@@ -451,7 +456,6 @@ namespace GFGGame
                             if (_handClick)
                             {
                                 _handClick = false;
-                                Timers.inst.Remove(UpClickDataTime);
                                 _ui.m_touchFlipOpen.touchable = false;
                             }
                         }