Browse Source

1_1评分引导

zhaoyang 3 years ago
parent
commit
0c5b9848d3

+ 1 - 0
FGUIProject/assets/Main/components/comClickCircle.xml

@@ -14,6 +14,7 @@
   </transition>
   <transition name="t1">
     <item time="0" type="Alpha" target="n7_vuz5" value="1"/>
+    <item time="0" type="Visible" target="n12_vuz5" value="false"/>
     <item time="0" type="Visible" target="n7_vuz5" value="true"/>
     <item time="0" type="XY" target="n7_vuz5" tween="true" startValue="-7,-8" endValue="-7,-259" duration="12" ease="Linear"/>
     <item time="6" type="Alpha" target="n7_vuz5" tween="true" startValue="1" endValue="0" duration="6" ease="Linear"/>

+ 18 - 1
GameClient/Assets/Game/HotUpdate/Controller/GuideController.cs

@@ -86,6 +86,20 @@ namespace GFGGame
                 }
             }
         }
+        public static void TryGuideDressUpFightViewBtnNext0(GObject target)
+        {
+            if (GuideDataManager.GetGuideCount(ConstGuideId.CHAPTER_VIEW_BTN_HOME) <= 0)
+            {
+                ShowGuide(target, false, "换好衣服后,点击下一步进行战斗");
+            }
+        }
+        public static void TryGuideSingleScoreViewComClickCircle(GObject target)
+        {
+            // if (GuideDataManager.GetGuideCount(ConstGuideId.CHAPTER_VIEW_BTN_HOME) <= 0)
+            // {
+            ShowGuide(target, false, "点击圆圈进行部件评分,精准率越高,部件额外加分越高哦");
+            // }
+        }
 
         public static void TryGuideDressUpFightViewBtnRecommend(GObject target)
         {
@@ -102,7 +116,7 @@ namespace GFGGame
         {
             if (GuideDataManager.GetGuideCount(ConstGuideId.CHAPTER_VIEW_BTN_HOME) <= 0
                 && !StoryDataManager.CheckLevelPass(StoryDataManager.currentChapter, StoryDataManager.currentLevel)
-                && EquipDataCache.cacher.CheckCurrentScoreEnough()
+                 && EquipDataCache.cacher.CheckCurrentScoreEnough()
                 && EquipDataCache.cacher.CheckEquipedFightNeeded())
             {
                 ShowGuide(target, false, "服装搭配好后,点击下一步,看看战果如何");
@@ -149,7 +163,10 @@ namespace GFGGame
                 }
             }
         }
+        /**************************************************引导购买必需品****************************************************/
+
 
+        /*******************************************************************************************************************/
         public static bool TryGuideByGuideId(GObject target, int guideId, int maxCount = 1, bool needUpdate = false, string guideStr = null, int yTxt = 0, int preGuideIdAtThisLogin = 0)
         {
             if (preGuideIdAtThisLogin > 0 && !GuideDataManager.CheckGuideIsCompletedAtThisLogin(preGuideIdAtThisLogin))

+ 10 - 10
GameClient/Assets/Game/HotUpdate/Data/GuideDataManager.cs

@@ -6,7 +6,7 @@ namespace GFGGame
     public class GuideDataManager
     {
         public static int currentGuideId;
-        private static Dictionary<int, GuideData> _dataDic = new Dictionary<int, GuideData>(); 
+        private static Dictionary<int, GuideData> _dataDic = new Dictionary<int, GuideData>();
         //本次登录引导的id缓存
         private static Dictionary<int, bool> _guideDicAtThisLogin = new Dictionary<int, bool>();
 
@@ -15,9 +15,9 @@ namespace GFGGame
             currentGuideId = 0;
             _dataDic.Clear();
             _guideDicAtThisLogin.Clear();
-            if(list != null)
+            if (list != null)
             {
-                foreach(GuideData data in list)
+                foreach (GuideData data in list)
                 {
                     _dataDic.Add(data.guideId, data);
                 }
@@ -26,14 +26,14 @@ namespace GFGGame
 
         public static bool TryCompleteGuide(int guideId)
         {
-            if(GameGlobal.skipGuide)
+            if (GameGlobal.skipGuide)
             {
                 return false;
             }
-            if(currentGuideId == guideId)
+            if (currentGuideId == guideId)
             {
                 GuideData guideData = null;
-                if(_dataDic.ContainsKey(guideId))
+                if (_dataDic.ContainsKey(guideId))
                 {
                     guideData = _dataDic[guideId];
                 }
@@ -44,7 +44,7 @@ namespace GFGGame
                     guideData.count = 0;
                     _dataDic.Add(guideId, guideData);
                 }
-                guideData.count ++;
+                guideData.count++;
                 currentGuideId = 0;
                 GameProxy.ReqUpdateRoleGuide(guideData);
                 _guideDicAtThisLogin[guideId] = true;
@@ -55,17 +55,17 @@ namespace GFGGame
 
         public static int GetGuideCount(int guideId)
         {
-            if(_dataDic.ContainsKey(guideId))
+            if (_dataDic.ContainsKey(guideId))
             {
                 GuideData guideData = _dataDic[guideId];
                 return guideData.count;
             }
             return 0;
         }
-        
+
         public static bool CheckGuideIsCompletedAtThisLogin(int guideId)
         {
-            if(_guideDicAtThisLogin.ContainsKey(guideId))
+            if (_guideDicAtThisLogin.ContainsKey(guideId))
             {
                 return _guideDicAtThisLogin[guideId];
             }

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

@@ -235,6 +235,10 @@ namespace GFGGame
                 EquipDataCache.cacher.TryCancelSuit(id);
                 EquipDataCache.cacher.AddOrRemove(id, true);
                 UpdateListPartsSelected();
+                if (_guideMenu)
+                {
+                    GuideController.TryGuideDressUpFightViewBtnNext0(_ui.m_btnNext);
+                }
             }
         }
 

+ 18 - 11
GameClient/Assets/Game/HotUpdate/Views/MainStory/StoryFightSingleScoreView.cs

@@ -88,24 +88,31 @@ namespace GFGGame
         {
             Debug.Log("index:" + _index);
             Vector2 pos = (_ui.target.GetChild("grh_" + _index).asGraph).xy;
-            // int numX = UnityEngine.Random.Range(0, 2);
-            // int signX = numX % 2 == 0 ? 1 : -1;
-            // float rangeX = UnityEngine.Random.Range(0, _range);
-            float x = 0f;// pos.x + signX * (rangeX);
-
-            // int numY = UnityEngine.Random.Range(0, 2);
-            // int signY = numY % 2 == 0 ? 1 : -1;
-            // float rangeY = UnityEngine.Random.Range(0, _range);
-            float y = 0f;// pos.y + signY * (rangeY);
+            float x = 0f;
+            float y = 0f;
 
             EquipDataCache.cacher.GetCirclePos(pos, _range, out x, out y);
             _ui.m_comClickCircle.target.SetXY(x, y);
             _ui.m_comClickCircle.target.visible = true;
-            _ui.m_comClickCircle.m_t0.Play(CircleScoreEnd);
+
+
+            if (_index == 0 && GuideDataManager.GetGuideCount(ConstGuideId.CHAPTER_VIEW_BTN_HOME) <= 0)
+            {
+                _ui.m_comClickCircle.m_t0.Play(1, 0, 0, 0.5f, () =>
+                {
+                    GuideController.TryGuideSingleScoreViewComClickCircle(_ui.m_comClickCircle.m_loaCircle);
+                });
+            }
+            else
+            {
+                _ui.m_comClickCircle.m_t0.Play(CircleScoreEnd);
+            }
+
         }
 
         private void CircleScoreEnd()
         {
+            GuideController.HideGuide();
             _ui.m_comClickCircle.m_loaCircle.onClick.Remove(CircleScoreEnd);
 
             int clickState = GetClickState();
@@ -129,7 +136,7 @@ namespace GFGGame
             double partScore = ScoreSystemData.Instance.GetPartItemScore(partId);
             double clickScore = +ScoreSystemData.Instance.GetPartItemClickScore(_mainScore, clickState);
             int count = (int)(partScore + clickScore);
-            // Debug.Log("partScore:" + partScore + "   clickScore:" + clickScore + "   count:" + count + "   clickState:" + clickState + "  _mainScore:" + _mainScore);
+
             comScoreResult.m_txtCount0.text = count.ToString();
             comScoreResult.m_txtCount1.text = count.ToString();
             comScoreResult.m_txtCount2.text = count.ToString();

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