Browse Source

引导双人战斗

zhaoyang 3 years ago
parent
commit
4087ac9ab4

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

@@ -3,6 +3,10 @@ namespace GFGGame
     public class ConstGuideId
     public class ConstGuideId
     {
     {
         public const int SINGLE_FIGHT_GUIDE = 1;//单人战斗引导
         public const int SINGLE_FIGHT_GUIDE = 1;//单人战斗引导
+        public const int CLOTHING_SHOP_VIEW_BTN_BUY = 11; //引导购买必需品
+        public const int SEE_DRESS_TIPS = 12; //点击查看关卡提示
+        public const int TARGET_FIGHT_GUIDE = 13; //双人对战算分提示
+
         public const int MAIN_UI_BTN_HUAN_ZHUANG = 2;
         public const int MAIN_UI_BTN_HUAN_ZHUANG = 2;
         public const int MAIN_UI_BTN_ZHAI_XING = 3;
         public const int MAIN_UI_BTN_ZHAI_XING = 3;
         public const int LUCKY_BOX_VIEW_BTN_BACK = 4;
         public const int LUCKY_BOX_VIEW_BTN_BACK = 4;
@@ -12,6 +16,5 @@ namespace GFGGame
         public const int GET_BONUS_VIEW = 8;
         public const int GET_BONUS_VIEW = 8;
         public const int GET_SUIT_ITEM_VIEW_FIRST = 9;
         public const int GET_SUIT_ITEM_VIEW_FIRST = 9;
         public const int DRESS_UP_VIEW_BTN_BACK = 10;
         public const int DRESS_UP_VIEW_BTN_BACK = 10;
-        public const int CLOTHING_SHOP_VIEW_BTN_BUY = 11;
     }
     }
 }
 }

+ 40 - 21
GameClient/Assets/Game/HotUpdate/Controller/GuideController.cs

@@ -151,8 +151,7 @@ namespace GFGGame
         {
         {
             if (GuideDataManager.GetGuideCount(ConstGuideId.CLOTHING_SHOP_VIEW_BTN_BUY) <= 0
             if (GuideDataManager.GetGuideCount(ConstGuideId.CLOTHING_SHOP_VIEW_BTN_BUY) <= 0
                 && StoryDataManager.currentLevel == 4
                 && StoryDataManager.currentLevel == 4
-                && !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel)
-                && DressUpMenuItemDataManager.GetRecommendCount() >= 2)
+                && !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel))
             {
             {
                 ShowGuide(target, false, "点击购买");
                 ShowGuide(target, false, "点击购买");
             }
             }
@@ -162,8 +161,7 @@ namespace GFGGame
         {
         {
             if (GuideDataManager.GetGuideCount(ConstGuideId.CLOTHING_SHOP_VIEW_BTN_BUY) <= 0
             if (GuideDataManager.GetGuideCount(ConstGuideId.CLOTHING_SHOP_VIEW_BTN_BUY) <= 0
                 && StoryDataManager.currentLevel == 4
                 && StoryDataManager.currentLevel == 4
-                && !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel)
-                && DressUpMenuItemDataManager.GetRecommendCount() >= 2)
+                && !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel))
             {
             {
                 ShowGuide(target, false, "点击返回,继续搭配衣服");
                 ShowGuide(target, false, "点击返回,继续搭配衣服");
             }
             }
@@ -173,8 +171,7 @@ namespace GFGGame
         {
         {
             if (GuideDataManager.GetGuideCount(ConstGuideId.CLOTHING_SHOP_VIEW_BTN_BUY) <= 0
             if (GuideDataManager.GetGuideCount(ConstGuideId.CLOTHING_SHOP_VIEW_BTN_BUY) <= 0
                && StoryDataManager.currentLevel == 4
                && StoryDataManager.currentLevel == 4
-               && !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel)
-               && DressUpMenuItemDataManager.GetRecommendCount() >= 2)
+               && !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel))
             {
             {
                 int len = _list.numChildren;
                 int len = _list.numChildren;
                 for (int i = 0; i < len; i++)
                 for (int i = 0; i < len; i++)
@@ -211,19 +208,42 @@ namespace GFGGame
                 }
                 }
             }
             }
         }
         }
-        // public static void TryGuideDressUpFightViewMenuPart(GList list)
-        // {
-        //     if (list.numChildren > 0)
-        //     {
-        //         UI_PartsListItem listItem = UI_PartsListItem.Proxy(list.GetChildAt(0));
-        //         if (listItem != null)
-        //         {
-        //             ShowGuide(listItem.target, true, "点击");
-        //             return;
-        //         }
-        //     }
-        // }
 
 
+        /***************************************************点击查看关卡提示***************************************************/
+        public static void TryGuideDressUpFightViewBtnHint(GObject target)
+        {
+            if (GuideDataManager.GetGuideCount(ConstGuideId.SEE_DRESS_TIPS) <= 0
+                && StoryDataManager.currentLevel == 6
+                && !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel))
+            {
+                GuideDataManager.currentGuideId = ConstGuideId.SEE_DRESS_TIPS;
+                ShowGuide(target, false, "点击查看过关提示");
+            }
+        }
+
+
+        /******************************************************双人对战评分************************************************/
+
+        public static void TryGuideStoryFightTargetScoreComCircle(GObject target, float devWidth, float devHeight)
+        {
+            if (GuideDataManager.GetGuideCount(ConstGuideId.TARGET_FIGHT_GUIDE) <= 0
+                && StoryDataManager.currentLevel == 6
+                && !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel))
+            {
+                GuideDataManager.currentGuideId = ConstGuideId.TARGET_FIGHT_GUIDE;
+                ShowGuide(target, false, "双人对战部件评分会显示在这里", 0, devWidth, devHeight);
+            }
+        }
+        public static void TryGuideStoryFightTargetScorebtnSkill0(GObject target)
+        {
+            if (GuideDataManager.GetGuideCount(ConstGuideId.TARGET_FIGHT_GUIDE) <= 0
+                && StoryDataManager.currentLevel == 6
+                && !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel))
+            {
+                ShowGuide(target, false, "点击使用技能");
+            }
+        }
+        /******************************************************************************************************/
 
 
         public static bool TryGuideDressUpViewMenuType1(GList list)
         public static bool TryGuideDressUpViewMenuType1(GList list)
         {
         {
@@ -265,7 +285,6 @@ namespace GFGGame
                 }
                 }
             }
             }
         }
         }
-        /**************************************************引导购买必需品****************************************************/
 
 
 
 
         /*******************************************************************************************************************/
         /*******************************************************************************************************************/
@@ -299,14 +318,14 @@ namespace GFGGame
             ViewManager.Hide(ViewName.GUIDE_VIEW);
             ViewManager.Hide(ViewName.GUIDE_VIEW);
         }
         }
 
 
-        private static void ShowGuide(GObject target, bool needUpdate = false, string guideStr = null, int yTxt = 0)
+        private static void ShowGuide(GObject target, bool needUpdate = false, string guideStr = null, int yTxt = 0, float devWidth = 0, float devHeight = 0)
         {
         {
             HideGuide();
             HideGuide();
             if (GameGlobal.skipGuide)
             if (GameGlobal.skipGuide)
             {
             {
                 return;
                 return;
             }
             }
-            ViewManager.Show(ViewName.GUIDE_VIEW, new List<object> { target, needUpdate, guideStr, yTxt });
+            ViewManager.Show(ViewName.GUIDE_VIEW, new List<object> { target, needUpdate, guideStr, yTxt, devWidth, devHeight });
         }
         }
     }
     }
 }
 }

+ 6 - 0
GameClient/Assets/Game/HotUpdate/Views/DressUp/DressUpFightView.cs

@@ -161,6 +161,10 @@ namespace GFGGame
             {
             {
                 GuideController.TryGuideDressUpFightViewBtnRecommend(_ui.m_compNeed.target, _ui.m_comListType1.m_listType);
                 GuideController.TryGuideDressUpFightViewBtnRecommend(_ui.m_compNeed.target, _ui.m_comListType1.m_listType);
             }
             }
+            else if (GuideDataManager.GetGuideCount(ConstGuideId.SEE_DRESS_TIPS) <= 0)
+            {
+                GuideController.TryGuideDressUpFightViewBtnHint(_ui.m_btnHint);
+            }
         }
         }
 
 
         protected override void OnHide()
         protected override void OnHide()
@@ -277,6 +281,8 @@ namespace GFGGame
         private void OnClickBtnHint()
         private void OnClickBtnHint()
         {
         {
             this.ShowTaskHint();
             this.ShowTaskHint();
+            GuideController.HideGuide();
+            GuideController.TryCompleteGuide(ConstGuideId.SEE_DRESS_TIPS);
         }
         }
 
 
         private void OnClickBtnDelete()
         private void OnClickBtnDelete()

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

@@ -11,7 +11,8 @@ namespace GFGGame
         private UI_GuideUI _ui;
         private UI_GuideUI _ui;
         private bool _needUpdate;
         private bool _needUpdate;
         private GObject guideTarget = null;
         private GObject guideTarget = null;
-
+        private float devWidth;
+        private float devHeight;
         public override void Dispose()
         public override void Dispose()
         {
         {
             base.Dispose();
             base.Dispose();
@@ -40,14 +41,16 @@ namespace GFGGame
             _needUpdate = (bool)dataList[1];
             _needUpdate = (bool)dataList[1];
             string txtContent = (string)dataList[2];
             string txtContent = (string)dataList[2];
             int yTxt = (int)dataList[3];
             int yTxt = (int)dataList[3];
-            if(txtContent != null && txtContent.Length > 0)
+            devWidth = (float)dataList[4];
+            devHeight = (float)dataList[5];
+            if (txtContent != null && txtContent.Length > 0)
             {
             {
                 _ui.m_compTxt.m_txt.text = txtContent;
                 _ui.m_compTxt.m_txt.text = txtContent;
-                if(this._ui.m_compTxt.m_txt.textHeight > this._ui.m_compTxt.m_txt.textFormat.size*2)
+                if (this._ui.m_compTxt.m_txt.textHeight > this._ui.m_compTxt.m_txt.textFormat.size * 2)
                 {
                 {
                     this._ui.m_compTxt.m_txt.align = AlignType.Left;
                     this._ui.m_compTxt.m_txt.align = AlignType.Left;
                 }
                 }
-                else 
+                else
                 {
                 {
                     this._ui.m_compTxt.m_txt.align = AlignType.Center;
                     this._ui.m_compTxt.m_txt.align = AlignType.Center;
                 }
                 }
@@ -91,9 +94,9 @@ namespace GFGGame
 
 
         private void UpdateGuideRect(object param = null)
         private void UpdateGuideRect(object param = null)
         {
         {
-            if(guideTarget != null)
+            if (guideTarget != null)
             {
             {
-                Rect rect = guideTarget.TransformRect(new Rect(0, 0, guideTarget.width, guideTarget.height), _ui.target);
+                Rect rect = guideTarget.TransformRect(new Rect(0 + devWidth, devHeight, guideTarget.width, guideTarget.height), _ui.target);
                 _ui.m_mask.m_guideArea.size = new Vector2((int)rect.size.x, (int)rect.size.y);
                 _ui.m_mask.m_guideArea.size = new Vector2((int)rect.size.x, (int)rect.size.y);
                 _ui.m_mask.m_guideArea.position = new Vector2((int)rect.position.x, (int)rect.position.y);
                 _ui.m_mask.m_guideArea.position = new Vector2((int)rect.position.x, (int)rect.position.y);
                 int padding = 30;
                 int padding = 30;
@@ -107,7 +110,7 @@ namespace GFGGame
                     _ui.m_compTxt.target.y = _ui.m_mask.m_guideArea.y + _ui.m_mask.m_guideArea.height + padding;
                     _ui.m_compTxt.target.y = _ui.m_mask.m_guideArea.y + _ui.m_mask.m_guideArea.height + padding;
                 }
                 }
                 int targetWidth = 20;
                 int targetWidth = 20;
-                if(Mathf.Abs(_ui.m_rectFrameTemp.width - _ui.m_rectFrame.target.width) > targetWidth && Mathf.Abs(_ui.m_rectFrameTemp.height - _ui.m_rectFrame.target.height) > targetWidth)
+                if (Mathf.Abs(_ui.m_rectFrameTemp.width - _ui.m_rectFrame.target.width) > targetWidth && Mathf.Abs(_ui.m_rectFrameTemp.height - _ui.m_rectFrame.target.height) > targetWidth)
                 {
                 {
                     _ui.m_rectFrameTemp.visible = true;
                     _ui.m_rectFrameTemp.visible = true;
                     float duration = 0.5f;
                     float duration = 0.5f;

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

@@ -35,6 +35,8 @@ namespace GFGGame
         private GoWrapper _wrapper1_1;
         private GoWrapper _wrapper1_1;
         private Dictionary<int, RoleSkillCfg> _npcSkillDic;
         private Dictionary<int, RoleSkillCfg> _npcSkillDic;
 
 
+        private bool playStop = false;
+
         public override void Dispose()
         public override void Dispose()
         {
         {
             if (_scenePrefab != null)
             if (_scenePrefab != null)
@@ -74,6 +76,18 @@ namespace GFGGame
             {
             {
                 Skip();
                 Skip();
             });
             });
+            _ui.m_comMineCircle.target.onClick.Add(() =>
+            {
+                if (_index == 0 && GuideDataManager.GetGuideCount(ConstGuideId.TARGET_FIGHT_GUIDE) <= 0 && playStop)
+                {
+                    playStop = false;
+                    _ui.m_comTargetCircle.target.visible = false;
+                    _ui.m_comMineCircle.target.visible = false;
+                    _ui.m_comMineCircle.m_t0.Stop(true, false);
+                    _ui.m_comTargetCircle.m_t0.Stop(true, false);
+                    GuideController.TryGuideStoryFightTargetScorebtnSkill0(_ui.m_btnSkill0.target);
+                }
+            });
         }
         }
 
 
         protected override void OnShown()
         protected override void OnShown()
@@ -186,11 +200,23 @@ namespace GFGGame
         {
         {
             _ui.m_comMineCircle.target.visible = true;
             _ui.m_comMineCircle.target.visible = true;
             _ui.m_comMineCircle.m_txtPart.text = FightScoreCfgArray.Instance.GetCfg(_index + 1).name;
             _ui.m_comMineCircle.m_txtPart.text = FightScoreCfgArray.Instance.GetCfg(_index + 1).name;
-            _ui.m_comMineCircle.m_t0.Play(CircleScoreEnd);
 
 
             _ui.m_comTargetCircle.target.visible = true;
             _ui.m_comTargetCircle.target.visible = true;
             _ui.m_comTargetCircle.m_txtPart.text = FightScoreCfgArray.Instance.GetCfg(_index + 1).name;
             _ui.m_comTargetCircle.m_txtPart.text = FightScoreCfgArray.Instance.GetCfg(_index + 1).name;
+            if (_index == 0 && GuideDataManager.GetGuideCount(ConstGuideId.TARGET_FIGHT_GUIDE) <= 0)
+            {
+
+                _ui.m_comMineCircle.m_t0.Play(1, 0, 0, 0.75f, () =>
+                 {
+                     playStop = true;
+                     GuideController.TryGuideStoryFightTargetScoreComCircle(_ui.m_comMineCircle.target, -128f, -128f);
+                 });
+                _ui.m_comTargetCircle.m_t0.Play(1, 0, 0, 0.75f, null);
+                return;
+            }
+            _ui.m_comMineCircle.m_t0.Play(CircleScoreEnd);
             _ui.m_comTargetCircle.m_t0.Play();
             _ui.m_comTargetCircle.m_t0.Play();
+
         }
         }
         private void CircleScoreEnd()
         private void CircleScoreEnd()
         {
         {
@@ -284,6 +310,12 @@ namespace GFGGame
 
 
             UpdateProgressBar();
             UpdateProgressBar();
 
 
+            if (_index == 0 && GuideDataManager.GetGuideCount(ConstGuideId.TARGET_FIGHT_GUIDE) <= 0 && role == SkillDataManager.MINE)
+            {
+                GuideController.HideGuide();
+                GuideController.TryCompleteGuide(ConstGuideId.TARGET_FIGHT_GUIDE);
+                CircleScoreEnd();
+            }
         }
         }
 
 
         //荆钗效果
         //荆钗效果

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

@@ -117,7 +117,7 @@ namespace GFGGame
             _valueBarController.OnShown();
             _valueBarController.OnShown();
             AddEffect();
             AddEffect();
 
 
-            TryGuide();
+            // TryGuide();
             Timers.inst.AddUpdate(Update);
             Timers.inst.AddUpdate(Update);
         }
         }