Эх сурвалжийг харах

奖励弹窗演示0.5秒才可以关闭

huangxiaoyue 1 жил өмнө
parent
commit
b466cbcc6d

+ 9 - 1
GameClient/Assets/Game/HotUpdate/Views/CommonGame/RewardView.cs

@@ -49,6 +49,7 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
+            _ui.m_mask.touchable = false;
             if ((this.viewData as object[]).Length > 0)
             {
                 _listItemDatas = (this.viewData as object[])[0] as List<ItemData>;
@@ -79,6 +80,12 @@ namespace GFGGame
             _ui.m_comList.m_listReward.numItems = 0;
             counTime = 0;
             Timers.inst.Add(0.1f, 3, OnTimerUpdate, 1);
+            Timers.inst.Add(0.5f, 1, OnTimerClick);
+        }
+
+        private void OnTimerClick(object param)
+        { 
+            _ui.m_mask.touchable = true;
         }
 
         private void OnTimerUpdate(object param)
@@ -114,7 +121,8 @@ namespace GFGGame
             _effectUI2 = null;
             
             Timers.inst.Remove(OnTimerUpdate);
-
+            Timers.inst.Remove(OnTimerClick);
+            _ui.m_mask.touchable = true;
             for (int i = 0; i < _effects.Count; i++)
             {
                 if (_effects[i] != null)