فهرست منبع

引导使用卡牌

zhaoyang 3 سال پیش
والد
کامیت
0a7975382b

+ 1 - 1
FGUIProject/assets/Main/StoryCardChooseUI.xml

@@ -8,7 +8,7 @@
     <text id="n6_cn27" name="txtDiscribe" xy="67,217" size="847,89" fontSize="34" color="#a28d77" autoSize="none" autoClearText="true" text="旋律在指尖流转,在天幕中划出一道起伏的星轨折线谱, 爱与星光星幕下的奏鸣!"/>
     <text id="n11_wzce" name="txtTips" xy="653,342" size="267,51" fontSize="38" color="#c67c6b" text="选择适合的词牌"/>
     <image id="n10_wzce" name="n10" src="sx2v9q" fileName="imagesStory/zd_tctcxian_2.png" xy="614,360"/>
-    <list id="n0_r1a9" name="listCard" xy="27,415" size="923,657" layout="flow_hz" overflow="scroll" lineGap="21" colGap="14" defaultItem="ui://mfvz4q8kr1a99f" align="center" autoClearItems="true">
+    <list id="n0_r1a9" name="listCard" xy="27,415" size="923,657" layout="flow_hz" overflow="scroll" lineGap="21" colGap="20" defaultItem="ui://mfvz4q8kr1a99f" autoClearItems="true">
       <item/>
       <item/>
       <item/>

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

@@ -10,6 +10,7 @@ namespace GFGGame
         public const int LUCKY_BOX_VIEW_BTN_BACK = 4;//引导摘星后引导返回主界面
         public const int MAIN_UI_BTN_HUAN_ZHUANG = 2;//引导换装
         public const int SUIT_SYNTHETIC_GUIDE = 14;//引导套装合成
+        public const int USE_CARD_FIGHT = 15;//引导使用卡牌战斗
 
         public const int MAIN_UI_BTN_STORY = 5;
         public const int CHAPTER_RESULT_VIEW = 6;

+ 33 - 0
GameClient/Assets/Game/HotUpdate/Controller/GuideController.cs

@@ -433,6 +433,39 @@ namespace GFGGame
             }
         }
 
+        /************************************************************引导使用卡牌战斗*******************************************************/
+        public static void TryGuideStoryCardChoose(GList list)
+        {
+
+            if (GuideDataManager.GetGuideCount(ConstGuideId.USE_CARD_FIGHT) <= 0
+                 && StoryDataManager.CheckLevelPass(2, 5)
+                 && !StoryDataManager.CheckLevelPass(2, 6)
+                && StoryDataManager.currentChapter == 2 && StoryDataManager.currentLevel == 6)
+            {
+                if (list.numChildren > 0)
+                {
+                    UI_ListCardItem listItem = UI_ListCardItem.Proxy(list.GetChildAt(0));
+                    if (listItem != null)
+                    {
+                        GuideDataManager.currentGuideId = ConstGuideId.USE_CARD_FIGHT;
+                        ShowGuide(listItem.target, true, "选择一张卡牌进行战斗");
+                        return;
+                    }
+
+                }
+            }
+        }
+        public static void TryGuideStoryCardChooseBtnConfirm(GObject target)
+        {
+
+            if (GuideDataManager.GetGuideCount(ConstGuideId.USE_CARD_FIGHT) <= 0
+                && StoryDataManager.CheckLevelPass(2, 5)
+                && !StoryDataManager.CheckLevelPass(2, 6))
+            {
+
+                ShowGuide(target, true, "点击确定进行战斗");
+            }
+        }
         /*******************************************************************************************************************/
         public static bool TryGuideByGuideId(GObject target, int guideId, int maxCount = 1, bool needUpdate = false, string guideStr = null, int yTxt = 0, int preGuideIdAtThisLogin = 0)
         {

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

@@ -44,6 +44,8 @@ namespace GFGGame
             _ui.m_listCard.numItems = cardList.Count;
             _ui.m_listCard.selectedIndex = 0;
             UpdateView(0);
+
+            GuideController.TryGuideStoryCardChoose(_ui.m_listCard);
         }
 
         private void UpdateView(int index)
@@ -68,6 +70,8 @@ namespace GFGGame
         private void OnListCardItemClick(EventContext context)
         {
             UpdateView(_ui.m_listCard.selectedIndex);
+            GuideController.TryGuideStoryCardChooseBtnConfirm(_ui.m_btnConfirm);
+
         }
         private void OnBtnComfirmClick()
         {
@@ -76,7 +80,8 @@ namespace GFGGame
             StoryDataManager.currentCardId = cfgs.Length > 0 ? cardId : -1;
             this.Hide();
             EventAgent.DispatchEvent(ConstMessage.CARD_CHOOSE);
-
+            GuideController.HideGuide();
+            GuideController.TryCompleteGuide(ConstGuideId.USE_CARD_FIGHT);
         }
 
         private static List<CardData> SortCardList(List<CardData> arrayList)

BIN
GameClient/Assets/ResIn/UI/Main/Main_fui.bytes