zhaoyang před 3 roky
rodič
revize
3833d2145a

+ 1 - 1
FGUIProject/assets/Card/components/ListCardItem.xml

@@ -3,7 +3,7 @@
   <displayList>
     <component id="n6_ojlz" name="loaCard" src="jzrr8n" fileName="components/ComCardMask.xml" xy="0,0"/>
     <image id="n20_pq5x" name="n20" src="pq5x60" fileName="images/kp_dikuang_1.png" xy="2,342"/>
-    <loader id="n23_94m1" name="loaBorder" xy="-2,0" size="242,441" url="ui://7l6lvkay94m19w" autoSize="true"/>
+    <loader id="n23_94m1" name="loaBorder" xy="-2,-2" size="242,441" url="ui://7l6lvkay94m19w" autoSize="true"/>
     <loader id="n19_pq5x" name="loaRarity" xy="178,14" size="50,50" url="ui://eg2y0ldppq5x62" autoSize="true"/>
     <text id="n8_ojlz" name="txtLv" xy="185,370" size="39,59" fontSize="24" color="#fff9f1" leading="-5" text="Lv.&#xA;30"/>
     <text id="n9_ojlz" name="txtName" xy="63,432" size="112,49" fontSize="36" color="#6a5d56" autoSize="none" text="赵钱孙"/>

+ 1 - 0
GameClient/Assets/Game/HotUpdate/Constant/ConstGuideId.cs

@@ -23,5 +23,6 @@ namespace GFGGame
         public const string GET_SUIT_ITEM_FIRST = "GET_SUIT_ITEM_FIRST";
         public const string GET_SUIT_ITEM_FULL = "GET_SUIT_ITEM_FULL";
         public const string GET_BONUS_FIRST = "GET_BONUS_FIRST";
+        public const string STUDIO_OPEN = "STUDIO_OPEN";
     }
 }

+ 35 - 3
GameClient/Assets/Game/HotUpdate/Controller/GuideController.cs

@@ -27,8 +27,28 @@ namespace GFGGame
             bool isGuide = GameGlobal.skipGuide == false && !isAllGuideFinish;
             return isGuide;
         }
+        /// <summary>
+        /// 检测当前角色等级是否有引导开启,若有则返回引导id
+        /// </summary>
+        /// <returns></returns>
+        public static string CheckHasRoleLvGuideOpen()
+        {
+            GuideCfg[] guideCfgs = GuideCfgArray.Instance.dataArray;
+
+            for (int i = 0; i < guideCfgs.Length; i++)
+            {
+                if (guideCfgs[i].roleLv <= 0) continue;
+                bool isFinishCurId = StorageDataManager.Instance.GetStorageValue(ConstStorageId.STORAGE_GUIDE + guideCfgs[i].id) > 0;
+                if (!isFinishCurId)
+                {
+                    return guideCfgs[i].viewName;
+                }
+            }
 
-        public static bool TryGuide(GObject target, string guideKey, int index, string guideStr = null, int listIndex = -1, bool checkPriorIndex = true, int yTxt = 0, float devWidth = 0, float devHeight = 0, bool showAni = true)
+            return "";
+        }
+
+        public static bool TryGuide(GObject target, string guideKey, int index, string guideStr = null, int listIndex = -1, bool checkPriorIndex = true, int yTxt = 0, float devWidth = 0, float devHeight = 0, bool showAni = true, bool checkChapterPass = false, bool isOptionalGuide = false)
         {
 
             GuideCfg cfg = GuideCfgArray.Instance.GetCfg(guideKey);
@@ -39,9 +59,20 @@ namespace GFGGame
             bool isFinishCurIndex = GuideDataManager.IsGuideIndexFinish(cfg.id, index) == true;//当前index未完成
             bool isFinishPriorIndex = !checkPriorIndex || checkPriorIndex && GuideDataManager.IsGuideIndexFinish(cfg.id, index - 1) == true;//前置index已完成
             bool isCfgChapterOpen = MainStoryDataManager.CheckLevelUnlock(cfg.storyLevelId);//引导配置关卡已开启
+            if (checkChapterPass && !isCfgChapterOpen)
+            {//cfg.storyLevelId为当前关卡,通关时 MainStoryDataManager.currentLevelCfgId为下一章的第一关,但下一章有可能因为角色等级不足未开启,会导致引导无法正常开启,所以添加是否通关检测
+                StoryLevelCfg levelCfg = StoryLevelCfgArray.Instance.GetCfg(cfg.storyLevelId);
+                if (levelCfg.chapterId - 1 > 0)
+                {
+                    isCfgChapterOpen = MainStoryDataManager.CheckNeedChapterPass(levelCfg.chapterId - 1, out int needChapterId);
+                }
+            }
             bool isCfgChapter = MainStoryDataManager.currentLevelCfgId == 0 || MainStoryDataManager.currentLevelCfgId == cfg.storyLevelId;//无选择(进入游戏时无选择)或当前所选择为配置关卡
 
-            if (isStoryLevelGuide && !isFinishCurId && isFinishPriorId && !isFinishCurIndex && isFinishPriorIndex && isCfgChapterOpen && isCfgChapter || !isStoryLevelGuide && !isFinishCurId)
+            bool isRoleLvGuide = cfg.roleLv > 0;
+            bool iscurRoleLv = RoleDataManager.lvl >= cfg.roleLv;
+
+            if (isStoryLevelGuide && !isFinishCurId && isFinishPriorId && !isFinishCurIndex && isFinishPriorIndex && isCfgChapterOpen && isCfgChapter || !isStoryLevelGuide && !isRoleLvGuide && !isFinishCurId || isRoleLvGuide && !isFinishCurId && iscurRoleLv)
             {
                 GuideDataManager.currentGuideId = cfg.id;
                 GuideDataManager.currentGuideIdIndex = index;
@@ -64,7 +95,8 @@ namespace GFGGame
                         return false;
                     }
                 }
-                ShowGuideByIndex(target, guideStr, yTxt, cfg.optionalGuide == 1, devWidth, devHeight, GuideDataManager.currentGuideId, GuideDataManager.currentGuideIdIndex, showAni);
+                bool _isOptionalGuide = isOptionalGuide ? isOptionalGuide : cfg.optionalGuide == 1;
+                ShowGuideByIndex(target, guideStr, yTxt, _isOptionalGuide, devWidth, devHeight, GuideDataManager.currentGuideId, GuideDataManager.currentGuideIdIndex, showAni);
                 if (!checkPriorIndex)
                 {
                     for (int i = 1; i < index; i++)

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Data/RoleDataManager.cs

@@ -114,7 +114,7 @@ namespace GFGGame
         }
         private static void CheckUpLv(object param)
         {
-            if (ViewManager.isViewOpen(typeof(FunctionOpenView).Name)) return;
+            if (ViewManager.isViewOpen(typeof(FunctionOpenView).Name)) return;//等功能开启展示完成后在展示角色升级
 
             if (GRoot.inst.GetTopWindow() == null)
             {

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/Card/CardDetailView.cs

@@ -142,7 +142,7 @@ namespace GFGGame
         {
             if (!ViewManager.CheckIsTopView(this.viewCom)) return;
 
-            GuideController.TryGuide(_ui.m_listCard, ConstGuideId.UP_CARD_LV, 3, "选择可升级的词牌", 0);
+            GuideController.TryGuide(_ui.m_listCard, ConstGuideId.UP_CARD_LV, 3, "选择可升级的词牌", 0, true, 0, 0, 0, true, true);
         }
     }
 }

+ 3 - 2
GameClient/Assets/Game/HotUpdate/Views/Card/CardFosterView.cs

@@ -760,9 +760,10 @@ namespace GFGGame
         protected override void UpdateToCheckGuide(object param)
         {
             if (!ViewManager.CheckIsTopView(this.viewCom)) return;
-            GuideController.TryGuide(_ui.m_ComFosterBottom.m_listLvConsume, ConstGuideId.UP_CARD_LV, 4, "长按材料图标,可持续给词牌增加经验", 0);
+            GuideController.TryGuide(_ui.m_ComFosterBottom.m_listLvConsume, ConstGuideId.UP_CARD_LV, 4, "长按材料图标,可持续给词牌增加经验", 0, true, 0, 0, 0, true, true);
+            GuideController.TryGuide(_ui.m_ComFosterBottom.m_btnUpLv, ConstGuideId.UP_CARD_LV, 5, "点击升级", -1, true, 0, 0, 0, true, true);
             // GuideController.TryGuide(_ui.m_ComFosterBottom.m_btnUpStar, ConstGuideId.UP_CARD_STAR, 5, "升满5星后,可解锁词牌的隐藏卡面哦");
-            GuideController.TryCompleteGuide(ConstGuideId.UP_CARD_LV, 4);
+            GuideController.TryCompleteGuide(ConstGuideId.UP_CARD_LV, 5);
         }
     }
 }

+ 4 - 4
GameClient/Assets/Game/HotUpdate/Views/Guide/GuideView.cs

@@ -44,9 +44,9 @@ namespace GFGGame
             _ui.m_rectFrame.target.AddRelation(_ui.m_mask.m_guideArea, RelationType.Height);
             _ui.m_rectFrame.target.AddRelation(_ui.m_mask.m_guideArea, RelationType.Left_Left);
             _ui.m_rectFrame.target.AddRelation(_ui.m_mask.m_guideArea, RelationType.Top_Top);
-            _ui.target.onClick.Add(() =>
+            _ui.m_mask.target.onClick.Add(() =>
             {
-                if (isOptionalGuide) this.Hide();
+                if (isOptionalGuide) this.OnClickTarget();
             });
             string resPath0 = ResPathUtil.GetViewEffectPath("ui_yd/ui_yd_y", "ui_yd_y");
             SceneController.AddObjectToView(_gameObject, _wrapper, _ui.m_comHolder.m_holder, resPath0, out _gameObject, out _wrapper);
@@ -105,7 +105,7 @@ namespace GFGGame
             else
             {
                 _ui.m_comHolder.target.visible = false;
-                _ui.m_mask.target.visible = false;
+                // _ui.m_mask.target.visible = false;
                 _ui.m_rectFrameTemp.visible = false;
 
             }
@@ -116,7 +116,7 @@ namespace GFGGame
         {
             Timers.inst.Remove(UpdateGuideRect);
             base.OnHide();
-            if (isOptionalGuide || guideTarget == null)
+            if (!isOptionalGuide && guideTarget == null)
             {
                 OnClickTarget();
             }

+ 1 - 1
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryChapterListView.cs

@@ -165,7 +165,7 @@ namespace GFGGame
             if (!ViewManager.CheckIsTopView(this.viewCom)) return;
 
             GuideController.TryGuide(_ui.m_btnBack, ConstGuideId.CLOTHING_DECOMPOSE, 1, "点击返回主界面");
-            GuideController.TryGuide(_ui.m_btnBack, ConstGuideId.UP_CARD_LV, 1, "点击返回主界面");
+            GuideController.TryGuide(_ui.m_btnBack, ConstGuideId.UP_CARD_LV, 1, "点击返回主界面", -1, true, 0, 0, 0, true, true);
 
         }
 

+ 4 - 1
GameClient/Assets/Game/HotUpdate/Views/MainUI/MainUIView.cs

@@ -378,9 +378,12 @@ namespace GFGGame
             GuideController.TryGuide(_ui.m_btnXiuFang.target, ConstGuideId.CLOTHING_SYNTHETIC, 1, "进入绣坊界面", -1, false);
             GuideController.TryCompleteGuide(ConstGuideId.CLOTHING_SYNTHETIC, 7);
 
-            GuideController.TryGuide(_ui.m_btnCiPai.target, ConstGuideId.UP_CARD_LV, 2, "获得了一张“词牌”,点击查看", -1, false);
+            GuideController.TryGuide(_ui.m_btnCiPai.target, ConstGuideId.UP_CARD_LV, 2, "获得了一张“词牌”,点击查看", -1, false, 0, 0, 0, true, true);
             GuideController.TryGuide(_ui.m_btnHuanZhuang.target, ConstGuideId.PHOTOGRAPH, 2, "点这里看看吧", -1, false);
 
+            GuideController.TryGuide(_ui.m_btnStudio.target, ConstGuideId.STUDIO_OPEN, 1, "工作室开门啦,进去看看~~");
+
+
         }
     }
 }

+ 5 - 1
GameClient/Assets/Game/HotUpdate/Views/RoleLvUp/RoleLvUpView.cs

@@ -55,7 +55,11 @@ namespace GFGGame
         protected override void OnHide()
         {
             base.OnHide();
-
+            string viewName = GuideController.CheckHasRoleLvGuideOpen();
+            if (viewName != "")
+            {
+                ViewManager.Show(viewName, null, null, true);
+            }
         }
     }
 }

+ 8 - 0
GameClient/Assets/Game/HotUpdate/Views/Studio/StudioView.cs

@@ -72,5 +72,13 @@ namespace GFGGame
         {
 
         }
+
+        protected override void UpdateToCheckGuide(object param)
+        {
+            if (!ViewManager.CheckIsTopView(this.viewCom)) return;
+            GuideController.TryGuide(null, ConstGuideId.STUDIO_OPEN, 2, "通关相应副本,可以获得各种升级材料哦,快开始今天的日常工作吧~~", -1, true, (int)(this.viewCom.height - 280), 0, 0, true, false, true);
+            GuideController.TryCompleteGuide(ConstGuideId.STUDIO_OPEN, 2);
+
+        }
     }
 }

binární
GameClient/Assets/ResIn/Config/excelConfig.sqlite.bytes


binární
GameClient/Assets/ResIn/UI/Card/Card_fui.bytes