Преглед изворни кода

抽卡快速点击会卡引导

zhaoyang пре 2 година
родитељ
комит
be2e7fdaaa
1 измењених фајлова са 9 додато и 5 уклоњено
  1. 9 5
      GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

+ 9 - 5
GameClient/Assets/Game/HotUpdate/Views/LuckyBox/LuckyBoxView.cs

@@ -83,10 +83,6 @@ namespace GFGGame
         protected override void OnShown()
         {
             base.OnShown();
-            // if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0)
-            // {
-            //     GRoot.inst.touchable = false;
-            // }
 
             int boxId = LuckyBoxDataManager.Instance.luckyBoxIds[0];
             if (this.viewData != null)
@@ -317,7 +313,8 @@ namespace GFGGame
         private void OnClickBtnBuyTen(EventContext context)
         {
 
-            if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0 && !ViewManager.isViewOpen(typeof(GuideView).FullName))
+            GuideCfg cfg = GuideCfgArray.Instance.GetCfg(ConstGuideId.LUCKY_BOX);
+            if (GuideDataManager.IsGuideFinish(ConstGuideId.LUCKY_BOX) <= 0 && (GuideDataManager.currentGuideId == 0 || GuideDataManager.currentGuideIdIndex != 2))
             {
                 //防止点击太快,在引导开启前就被点击到,导致引导卡死
                 return;
@@ -333,6 +330,7 @@ namespace GFGGame
             }
             LuckyBoxDataManager.Instance.CheckItemEnough(boxId, LuckyBoxDataManager.TEN_TIME, async () =>
             {
+
                 bool result = await LuckyBoxSProxy.ReqGetBonus(boxId, LuckyBoxDataManager.TEN_TIME);
                 if (result)
                 {
@@ -400,5 +398,11 @@ namespace GFGGame
             GuideController.TryGuide(null, ConstGuideId.LUCKY_BOX, 1, "“摘星”里可以通过星辰的力量获得服饰。", -1, true, _ui.target.height - 600);
             GuideController.TryGuide(btnBuyTen, ConstGuideId.LUCKY_BOX, 2, "点击摘取十次。");
         }
+        protected override void TryCompleteGuide()
+        {
+            base.TryCompleteGuide();
+            GuideCfg cfg = GuideCfgArray.Instance.GetCfg(ConstGuideId.LUCKY_BOX);
+            GuideController.TryCompleteGuideIndex(cfg.id, 2);
+        }
     }
 }