From 22d482183aa44aa2ffd837d8939a7b0bd15d28b9 Mon Sep 17 00:00:00 2001
From: liuzhiwei <liuzhiwei@qq.com>
Date: Thu, 29 Oct 2020 10:45:21 +0800
Subject: [PATCH] Merge branch 'master' of http://172.16.1.52:8090/r/GemBattle into master

---
 Assets/Scripts/Guide/GuideCtrl.cs |   87 +++++++++++++++++++++++--------------------
 1 files changed, 47 insertions(+), 40 deletions(-)

diff --git a/Assets/Scripts/Guide/GuideCtrl.cs b/Assets/Scripts/Guide/GuideCtrl.cs
index 064229b..c09fc1c 100644
--- a/Assets/Scripts/Guide/GuideCtrl.cs
+++ b/Assets/Scripts/Guide/GuideCtrl.cs
@@ -42,6 +42,7 @@
         EventCenter.Ins.Add((int)KTGMGemClient.EventType.GetOneTowerPos, GetOneTowerPos);
         EventCenter.Ins.Add((int)KTGMGemClient.EventType.CreateWaterLv1, CreateWaterLv1);
         EventCenter.Ins.Add((int)KTGMGemClient.EventType.SkillStep, SkillStep);
+        EventCenter.Ins.Add((int)KTGMGemClient.EventType.SkillRelease, SkillRelease);
         EventCenter.Ins.Add((int)KTGMGemClient.EventType.SkillReleaseDone, SkillReleaseDone);
 
     }
@@ -55,6 +56,7 @@
         EventCenter.Ins.Remove((int)KTGMGemClient.EventType.GetOneTowerPos, GetOneTowerPos);
         EventCenter.Ins.Remove((int)KTGMGemClient.EventType.CreateWaterLv1, CreateWaterLv1);
         EventCenter.Ins.Remove((int)KTGMGemClient.EventType.SkillStep, SkillStep);
+        EventCenter.Ins.Remove((int)KTGMGemClient.EventType.SkillRelease, SkillRelease);
         EventCenter.Ins.Remove((int)KTGMGemClient.EventType.SkillReleaseDone, SkillReleaseDone);
 
 
@@ -93,16 +95,16 @@
         allGuideDic.Add(GuideEnum.Step0, new string[] { GuideConfig.showWords[0], GuideConfig.showWords[1] });
         allGuideDic.Add(GuideEnum.Step1, new string[] { GuideConfig.showWords[2], GuideConfig.showWords[3] });
         allGuideDic.Add(GuideEnum.Step2, new string[] { GuideConfig.showWords[4], GuideConfig.showWords[5] });
-        allGuideDic.Add(GuideEnum.Step3, new string[] { GuideConfig.showWords[6], GuideConfig.showWords[7] });
-        allGuideDic.Add(GuideEnum.Step4, new string[] { GuideConfig.showWords[8] });
-        allGuideDic.Add(GuideEnum.Step5, new string[] { GuideConfig.showWords[9], GuideConfig.showWords[10] });
-        allGuideDic.Add(GuideEnum.Step6, new string[] { GuideConfig.showWords[11], GuideConfig.showWords[12] });
-        allGuideDic.Add(GuideEnum.Step7, new string[] { GuideConfig.showWords[13] });
-        allGuideDic.Add(GuideEnum.Step8, new string[] { GuideConfig.showWords[14], GuideConfig.showWords[15] });
-        allGuideDic.Add(GuideEnum.Step9, new string[] { GuideConfig.showWords[16], GuideConfig.showWords[17] });
-        allGuideDic.Add(GuideEnum.Step10, new string[] { GuideConfig.showWords[18], GuideConfig.showWords[19] });
-        allGuideDic.Add(GuideEnum.Step11, new string[] { GuideConfig.showWords[20], GuideConfig.showWords[21] });
-        allGuideDic.Add(GuideEnum.Step12, new string[] { GuideConfig.showWords[22], GuideConfig.showWords[23], GuideConfig.showWords[24] });
+        allGuideDic.Add(GuideEnum.Step3, new string[] { });
+        allGuideDic.Add(GuideEnum.Step4, new string[] { GuideConfig.showWords[6] });
+        allGuideDic.Add(GuideEnum.Step5, new string[] { GuideConfig.showWords[7], GuideConfig.showWords[8] });
+        allGuideDic.Add(GuideEnum.Step6, new string[] { GuideConfig.showWords[9], GuideConfig.showWords[10] });
+        allGuideDic.Add(GuideEnum.Step7, new string[] { GuideConfig.showWords[11] });
+        allGuideDic.Add(GuideEnum.Step8, new string[] { GuideConfig.showWords[12] });
+        allGuideDic.Add(GuideEnum.Step9, new string[] { });
+        allGuideDic.Add(GuideEnum.Step10, new string[] { GuideConfig.showWords[13], GuideConfig.showWords[14] });
+        allGuideDic.Add(GuideEnum.Step11, new string[] { GuideConfig.showWords[15] });
+        allGuideDic.Add(GuideEnum.Step12, new string[] { GuideConfig.showWords[16], GuideConfig.showWords[17] });
 
     }
 
@@ -175,7 +177,7 @@
         if (currentIndex == -1)//初始化本步
         {
             CommonDebugHelper.DebugError("第1步开始");
-            GA_SDK_Manager.Ins.Statistics(5);//埋点
+            TDAA_SDKManager.Ins.Statistics(5);//埋点
 
             currentIndex = 0;
             needIndex = 2;
@@ -192,8 +194,8 @@
         if (currentIndex == -1)
         {
             CommonDebugHelper.DebugError("第2步开始");
-            GA_SDK_Manager.Ins.Statistics(6);//埋点
-            GA_SDK_Manager.Ins.GuideStep(1);//埋点
+            TDAA_SDKManager.Ins.Statistics(6);//埋点
+            TDAA_SDKManager.Ins.GuideStep(1);//埋点
 
             currentIndex = 0;
             needIndex = 2;
@@ -239,7 +241,7 @@
         if (currentIndex == -1)
         {
             CommonDebugHelper.DebugError("第3步开始");
-            GA_SDK_Manager.Ins.GuideStep(2);//埋点
+            TDAA_SDKManager.Ins.GuideStep(2);//埋点
 
             currentIndex = 0;
             needIndex = 2;
@@ -261,30 +263,31 @@
         if (currentIndex == -1)
         {
             CommonDebugHelper.DebugError("第4步开始");
-            GA_SDK_Manager.Ins.GuideStep(3);//埋点
+            TDAA_SDKManager.Ins.GuideStep(3);//埋点
 
             currentIndex = 0;
             needIndex = 2;
-            panel.Step3(currentIndex, allGuideDic[currentStep][currentIndex]);
+            panel.Step3(currentIndex, "");
         }
     }
 
     //开始拖拽
     public void BeginDrag()
     {
-        panel.Step3_2(allGuideDic[currentStep][1]);
+        panel.Step3_2("");
     }
 
     //结束推拽 没有合成,回到上一步
     public void EndDrag()
     {
-        panel.Step3(0, allGuideDic[currentStep][0]);
+        panel.Step3(0, "");
     }
 
     //合成了卡牌,开始下一步
     private void AddCard()
     {
         currentIndex = -1;
+        panel.StopShowDragPath(false);
         ChangeStep(GuideEnum.Step4);
     }
 
@@ -293,9 +296,10 @@
         if (currentIndex == -1)
         {
             CommonDebugHelper.DebugError("第5步开始");
-            GA_SDK_Manager.Ins.GuideStep(4);//埋点
+            TDAA_SDKManager.Ins.GuideStep(4);//埋点
 
             currentIndex = 0;
+            panel.StopShowDragPath(true);
             panel.Step4(currentIndex, allGuideDic[currentStep][currentIndex]);
         }
     }
@@ -304,6 +308,7 @@
     private void CreateFireLv2()
     {
         currentIndex = -1;
+        panel.StopShowDragPath(true);
         ChangeStep(GuideEnum.Step5);
     }
 
@@ -313,7 +318,7 @@
         if (currentIndex == -1)
         {
             CommonDebugHelper.DebugError("第6步开始");
-            GA_SDK_Manager.Ins.GuideStep(5);//埋点
+            TDAA_SDKManager.Ins.GuideStep(5);//埋点
 
             EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.CreateFirstWave);
             panel.Step5(currentIndex, "");
@@ -341,7 +346,7 @@
         if (currentIndex == -1)
         {
             CommonDebugHelper.DebugError("第7步开始");
-            GA_SDK_Manager.Ins.GuideStep(6);//埋点
+            TDAA_SDKManager.Ins.GuideStep(6);//埋点
 
             panel.SetGuideUI(false);
             //恢复出怪
@@ -373,7 +378,7 @@
         if (currentIndex == -1)
         {
             CommonDebugHelper.DebugError("第8步开始");
-            GA_SDK_Manager.Ins.GuideStep(7);//埋点
+            TDAA_SDKManager.Ins.GuideStep(7);//埋点
 
             currentIndex = 0;
             needIndex = 1;
@@ -400,37 +405,34 @@
         if (currentIndex == -1)//初始化本步
         {
             CommonDebugHelper.DebugError("第9步开始");
-            GA_SDK_Manager.Ins.GuideStep(8);//埋点
+            TDAA_SDKManager.Ins.GuideStep(8);//埋点
             GameConfig.CanOpenNewTower = false;
 
             currentIndex = 0;
-            needIndex = 2;
+            needIndex = 1;
             panel.Step8();
-
-            panel.StartShowWord(allGuideDic[currentStep][currentIndex], ShowWordCallBack);
-        }
-        else if (currentIndex == 1)
-        {
             panel.StartShowWord(allGuideDic[currentStep][currentIndex], ShowWordCallBack);
         }
 
     }
+
+
 
     private void Step9()
     {
         if (currentIndex == -1)
         {
             CommonDebugHelper.DebugError("第10步开始");
-            GA_SDK_Manager.Ins.GuideStep(9);//埋点
+            TDAA_SDKManager.Ins.GuideStep(9);//埋点
 
             currentIndex = 0;
             needIndex = 2;
             panel.SetGuideUI(false);
-            panel.Step9(allGuideDic[currentStep][currentIndex], currentIndex, Step9_1);
+            panel.Step9("", currentIndex, Step9_1);
         }
         else if (currentIndex == 1)
         {
-            panel.Step9(allGuideDic[currentStep][currentIndex], currentIndex, null);
+            panel.Step9("", currentIndex, null);
         }
     }
 
@@ -446,6 +448,7 @@
     private void CreateWaterLv1()
     {
         panel.CleanMask();
+        panel.StopShowDragPath(true);
         EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.CreateSecondWave);//生成第二波小怪
     }
 
@@ -461,7 +464,7 @@
         if (currentIndex == -1)//初始化本步
         {
             CommonDebugHelper.DebugError("第11步开始");
-            GA_SDK_Manager.Ins.GuideStep(10);//埋点
+            TDAA_SDKManager.Ins.GuideStep(10);//埋点
 
             currentIndex = 0;
             needIndex = 2;
@@ -481,7 +484,7 @@
         if (currentIndex == -1)
         {
             CommonDebugHelper.DebugError("第12步开始");
-            GA_SDK_Manager.Ins.GuideStep(11);//埋点
+            TDAA_SDKManager.Ins.GuideStep(11);//埋点
 
             currentIndex = 0;
             needIndex = 1;
@@ -494,14 +497,18 @@
     //开始拖拽
     public void BeginDrag11_1()
     {
-
-        panel.Step11(1, allGuideDic[currentStep][1]);
+        panel.Step11(1, "");
     }
 
     //结束推拽 没有合成,回到上一步
     public void EndDrag11_1()
     {
         panel.Step11(0, allGuideDic[currentStep][0]);
+    }
+
+    private void SkillRelease()
+    {
+        panel.SkillRelease();
     }
 
 
@@ -517,14 +524,13 @@
         if (currentIndex == -1)//初始化本步
         {
             CommonDebugHelper.DebugError("第13步开始");
-            GA_SDK_Manager.Ins.GuideStep(12);//埋点
+            TDAA_SDKManager.Ins.GuideStep(12);//埋点
 
             currentIndex = 0;
-            needIndex = 3;
+            needIndex = 2;
             panel.Step12();
 
             panel.StartShowWord(allGuideDic[currentStep][currentIndex], ShowWordCallBack);
-
         }
         else
         {
@@ -535,12 +541,13 @@
     private void Finish()
     {
         UnityEngine.Debug.Log("新手指导已经完成了");
-        GA_SDK_Manager.Ins.GuideStep(13);//埋点
+        TDAA_SDKManager.Ins.GuideStep(13);//埋点
 
         GameConfig.CanOpenNewTower = true;
         GameConfig.CanBuyNewTower = true;
 
         EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.GuideFinish);
+        PlayerPrefs.SetInt("GemBattleGuide", 1);
         Destroy(gameObject);
         //gameObject.SetActive(false);
     }

--
Gitblit v1.9.1