Forráskód Böngészése

抽奖手动翻开展示界面都延迟0.5秒才可以关闭

huangxiaoyue 1 éve
szülő
commit
fc703be60e

+ 9 - 0
GameClient/Assets/Game/HotUpdate/Views/CommonGame/GetSuitItemVIew.cs

@@ -56,6 +56,7 @@ namespace GFGGame
         {
             base.OnShown();
             GRoot.inst.touchable = true;
+            _ui.m_loaBg.touchable = false;
             int suitId = (int)viewData;
             if(suitId == 202025)
             {
@@ -66,6 +67,7 @@ namespace GFGGame
                 _ui.m_icon.x = 0;
             }
             UpdateView(suitId);
+            Timers.inst.Add(0.5f, 1, OnTimerClick);
         }
 
         protected override void OnHide()
@@ -82,6 +84,13 @@ namespace GFGGame
 
             TryCompleteGuide();
 
+            Timers.inst.Remove(OnTimerClick);
+            _ui.m_loaBg.touchable = true;
+        }
+
+        private void OnTimerClick(object param)
+        {
+            _ui.m_loaBg.touchable = true;
         }
 
         private void OnClickBg()

+ 10 - 0
GameClient/Assets/Game/HotUpdate/Views/CommonGame/SuitItemView.cs

@@ -50,12 +50,15 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
+            _ui.m_loaBg.touchable = false;
             if (this.viewData != null) { 
                 suitID = (int)(this.viewData as object[])[0];
                 countSuitId = (int)(this.viewData as object[])[1];
             }
             UpdateView();
+            Timers.inst.Add(0.5f, 1, OnTimerClick);
         }
+
         private void UpdateView()
         {
             DressUpMenuSuitDataManager.GetSuitProgressBySuitId(suitID, out count, out totalCount);
@@ -70,8 +73,13 @@ namespace GFGGame
             _ui.m_probar.value = count - 1;
             _ui.m_t_open.Play();
             _ui.m_probar.TweenValue(count, 0.7f);
+        }
 
+        private void OnTimerClick(object param)
+        {
+            _ui.m_loaBg.touchable = true;
         }
+
         private void OnClickBg()
         {
             if(!GetSuitItemController.isAuto)
@@ -89,6 +97,8 @@ namespace GFGGame
         {
             _ui.m_probar.max = 0;
             _ui.m_probar.value = 0;
+            Timers.inst.Remove(OnTimerClick);
+            _ui.m_loaBg.touchable = true;
         }
     }
 }

+ 9 - 0
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxBonusShowView.cs

@@ -140,6 +140,7 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
+            _touchLoaBg = false;
             _rewardList.AddRange(this.viewData as List<ItemData>);
             _itemIdList.Clear();
             _itemObjList.Clear();
@@ -163,6 +164,7 @@ namespace GFGGame
                     UpdateItem(_ui.target.GetChild("item" + i).asCom, i, 10);
                 }
             }
+            Timers.inst.Add(0.5f, 1, UpDataTimeTouchLoaBg);
         }
 
         protected override void OnHide()
@@ -284,6 +286,13 @@ namespace GFGGame
 
         private void ShowItemTips(EventContext context)
         {
+            if (!_touchLoaBg)
+            {
+                return;
+            }
+            _touchLoaBg = false;
+            Timers.inst.Add(0.5f, 1, UpDataTimeTouchLoaBg);
+
             GObject obj = context.sender as GObject;
             int index = (int)obj.data;
             _chooseIndex = index;

+ 10 - 2
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxNewCardView.cs

@@ -40,10 +40,12 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
+            _ui.m_loaBg.touchable = false;
+
             _cardId = (int)this.viewData;
             // _newCardList = new List<int>((this.viewData as object[])[0] as List<int>);
             updateView();
-
+            Timers.inst.Add(0.5f, 1, OnTimerClick);
         }
         private void updateView()
         {
@@ -53,7 +55,8 @@ namespace GFGGame
         protected override void OnHide()
         {
             base.OnHide();
-
+            Timers.inst.Remove(OnTimerClick);
+            _ui.m_loaBg.touchable = true;
         }
 
         protected override void RemoveEventListener()
@@ -62,6 +65,11 @@ namespace GFGGame
 
         }
 
+        private void OnTimerClick(object param)
+        {
+            _ui.m_loaBg.touchable = true;
+        }
+
         private void OnClickBg()
         {
             if (!GetSuitItemController.isAuto)

+ 10 - 0
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxNewDressView.cs

@@ -69,6 +69,7 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
+            _ui.m_loaBg.touchable = false;
             _rewardParamList.Clear();
             _rewardList.Clear();
             _rewardParamList.AddRange(this.viewData as List<ItemData>);
@@ -92,6 +93,7 @@ namespace GFGGame
             }
 
             UpdateView();
+            Timers.inst.Add(0.5f, 1, OnTimerClick);
         }
         private void UpdateView()
         {
@@ -169,6 +171,11 @@ namespace GFGGame
 
         }
 
+        private void OnTimerClick(object param)
+        {
+            _ui.m_loaBg.touchable = true;
+        }
+
         private void OnClickBg()
         {
             //_ui.m_t_close.Play(() =>
@@ -222,6 +229,9 @@ namespace GFGGame
             _ui.m_t_close.Stop(true, false);
             _ui.m_t_open.Stop(true, false);
             _rewardList.Clear();
+            Timers.inst.Remove(OnTimerClick);
+            _ui.m_loaBg.touchable = true;
+
             base.OnHide();
             //ViewManager.Show<LuckyBoxBonusShowView>(_rewardParamList);
         }