From 1c693485cc0492d78ae4e120bb10f82a4aac9539 Mon Sep 17 00:00:00 2001
From: chenxin <chenxin6991@163.com>
Date: Tue, 27 Oct 2020 10:20:47 +0800
Subject: [PATCH] Merge branch 'master' of http://172.16.1.52:8090/r/GemBattle into master

---
 Assets/Scripts/GameAnalytics_SDK/GA_SDK_Manager.cs |   22 ++++++++++
 Assets/Materials/Guide/RectGuidance.mat            |    8 ++--
 ProjectSettings/ProjectSettings.asset              |    2 
 Assets/Scripts/Guide/GuideCtrl.cs                  |   49 +++++++++++++++++++++++-
 4 files changed, 72 insertions(+), 9 deletions(-)

diff --git a/Assets/Materials/Guide/RectGuidance.mat b/Assets/Materials/Guide/RectGuidance.mat
index d199ae7..dfc68a1 100644
--- a/Assets/Materials/Guide/RectGuidance.mat
+++ b/Assets/Materials/Guide/RectGuidance.mat
@@ -69,8 +69,8 @@
     - _OcclusionStrength: 1
     - _Parallax: 0.02
     - _Slider: 81.39478
-    - _SliderX: 75.042274
-    - _SliderY: 0.045135666
+    - _SliderX: 75.22463
+    - _SliderY: 80.22465
     - _SmoothnessTextureChannel: 0
     - _SpecularHighlights: 1
     - _SrcBlend: 1
@@ -83,7 +83,7 @@
     - _UseUIAlphaClip: 0
     - _ZWrite: 1
     m_Colors:
-    - _Center: {r: -150, g: -59.99974, b: 0, a: 0}
+    - _Center: {r: 6, g: -198, b: 0, a: 0}
     - _Color: {r: 1, g: 1, b: 1, a: 1}
     - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
-  m_BuildTextureStacks: []
+  m_BuildTextureStacks: []
\ No newline at end of file
diff --git a/Assets/Scripts/GameAnalytics_SDK/GA_SDK_Manager.cs b/Assets/Scripts/GameAnalytics_SDK/GA_SDK_Manager.cs
index 0af8587..30cb89a 100644
--- a/Assets/Scripts/GameAnalytics_SDK/GA_SDK_Manager.cs
+++ b/Assets/Scripts/GameAnalytics_SDK/GA_SDK_Manager.cs
@@ -1,4 +1,5 @@
-using UnityEngine;
+using System.Collections.Generic;
+using UnityEngine;
 
 public class GA_SDK_Manager : MonoBehaviour
 {
@@ -30,6 +31,7 @@
     public void SDKInit(string channelId)
     {
         Debug.Log("Unity SDK  init begin channelId:" + channelId);
+        TalkingDataGA.BackgroundSessionEnabled();
         TalkingDataGA.OnStart("B220F5C737384030947B202F19E32086", channelId);//appID是定死的
         Debug.Log("Unity SDK  init completed ");
     }
@@ -47,6 +49,24 @@
     }
 
 
+    /// <summary>
+    /// 使用自定义事件
+    /// </summary>
+    /// <param name="actionId">事件名称</param>
+    /// <param name="dic">需要传递的值</param>
+    public void OnEvent(string actionId, Dictionary<string, object> dic)
+    {
+        //示例:
+        // Dictionary<string, object> dic = new Dictionary<string, object>
+        // {
+        //     { "StringValue", "Pi" },
+        //     { "NumberValue", 3.14 }
+        // };
+        // TalkingDataGA.OnEvent("action_id", dic);
+
+        TalkingDataGA.OnEvent(actionId, dic);
+    }
+
     private void OnDestroy()
     {
         Debug.Log("onDestroy");
diff --git a/Assets/Scripts/Guide/GuideCtrl.cs b/Assets/Scripts/Guide/GuideCtrl.cs
index 8d5cf15..1ba0206 100644
--- a/Assets/Scripts/Guide/GuideCtrl.cs
+++ b/Assets/Scripts/Guide/GuideCtrl.cs
@@ -32,7 +32,9 @@
 
     private void Start()
     {
-        Init();
+        //int step = PlayerPrefs.GetInt("GemBattleGuide");
+
+        Init(0);
         EventCenter.Ins.Add((int)KTGMGemClient.EventType.AddCard, AddCard);
         EventCenter.Ins.Add((int)KTGMGemClient.EventType.CreateFireLv2, CreateFireLv2);
         EventCenter.Ins.Add((int)KTGMGemClient.EventType.ChargingEnd, ChargingEnd);
@@ -57,11 +59,28 @@
 
 
     }
-    public void Init()
+    public void Init(int step)
     {
         //Time.timeScale = 0;//游戏暂停,这样会导致协程停止了
-
         ChangeStep(GuideEnum.Step0);
+        // switch (step)
+        // {
+        //     case 2:
+        //     case 3:
+        //         //生成两个火元素
+        //         break;
+        //     case 4:
+        //         //生成1个2级火元素,标记上阵位置
+
+        //         break;
+        //     case 5:
+        //         //生成2级火元素塔,第一关小怪出木元素小怪
+
+        //         break;
+
+        // }
+        // ChangeStep((GuideEnum)(step + 1));
+
     }
 
     /// <summary>
@@ -154,6 +173,7 @@
         isShowing = true;
         if (currentIndex == -1)//初始化本步
         {
+            CommonDebugHelper.DebugError("第1步开始");
             currentIndex = 0;
             needIndex = 2;
             panel.SetGuideUI(true);
@@ -168,6 +188,8 @@
     {
         if (currentIndex == -1)
         {
+            CommonDebugHelper.DebugError("第2步开始");
+
             currentIndex = 0;
             needIndex = 2;
             panel.SetGuideUI(false);
@@ -211,6 +233,7 @@
         isShowing = true;
         if (currentIndex == -1)
         {
+            CommonDebugHelper.DebugError("第3步开始");
             currentIndex = 0;
             needIndex = 2;
             panel.Step2(currentIndex);
@@ -230,6 +253,8 @@
     {
         if (currentIndex == -1)
         {
+            CommonDebugHelper.DebugError("第4步开始");
+
             currentIndex = 0;
             needIndex = 2;
             panel.Step3(currentIndex, allGuideDic[currentStep][currentIndex]);
@@ -259,6 +284,8 @@
     {
         if (currentIndex == -1)
         {
+            CommonDebugHelper.DebugError("第5步开始");
+
             currentIndex = 0;
             panel.Step4(currentIndex, allGuideDic[currentStep][currentIndex]);
         }
@@ -276,6 +303,8 @@
     {
         if (currentIndex == -1)
         {
+            CommonDebugHelper.DebugError("第6步开始");
+
             EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.CreateFirstWave);
             panel.Step5(currentIndex, "");
         }
@@ -301,6 +330,8 @@
     {
         if (currentIndex == -1)
         {
+            CommonDebugHelper.DebugError("第7步开始");
+
             panel.SetGuideUI(false);
             //恢复出怪
             EventCenter.Ins.BroadCast((int)KTGMGemClient.EventType.RestartWave);
@@ -330,6 +361,8 @@
     {
         if (currentIndex == -1)
         {
+            CommonDebugHelper.DebugError("第8步开始");
+
             currentIndex = 0;
             needIndex = 1;
             panel.SetGuideUI(false);
@@ -353,6 +386,8 @@
         isShowing = true;
         if (currentIndex == -1)//初始化本步
         {
+            CommonDebugHelper.DebugError("第9步开始");
+
             currentIndex = 0;
             needIndex = 2;
             panel.Step8();
@@ -370,6 +405,8 @@
     {
         if (currentIndex == -1)
         {
+            CommonDebugHelper.DebugError("第10步开始");
+
             currentIndex = 0;
             needIndex = 2;
             panel.SetGuideUI(false);
@@ -407,6 +444,8 @@
         isShowing = true;
         if (currentIndex == -1)//初始化本步
         {
+            CommonDebugHelper.DebugError("第11步开始");
+
             currentIndex = 0;
             needIndex = 2;
             panel.SetGuideUI(true);
@@ -424,6 +463,8 @@
     {
         if (currentIndex == -1)
         {
+            CommonDebugHelper.DebugError("第12步开始");
+
             currentIndex = 0;
             needIndex = 1;
 
@@ -457,6 +498,8 @@
         isShowing = true;
         if (currentIndex == -1)//初始化本步
         {
+            CommonDebugHelper.DebugError("第13步开始");
+
             currentIndex = 0;
             needIndex = 3;
             panel.Step12();
diff --git a/ProjectSettings/ProjectSettings.asset b/ProjectSettings/ProjectSettings.asset
index 0019640..a7e36d4 100644
--- a/ProjectSettings/ProjectSettings.asset
+++ b/ProjectSettings/ProjectSettings.asset
@@ -664,7 +664,7 @@
   webGLDecompressionFallback: 0
   scriptingDefineSymbols:
     1: MOREMOUNTAINS_NICEVIBRATIONS
-    7: MOREMOUNTAINS_NICEVIBRATIONS
+    7: MOREMOUNTAINS_NICEVIBRATIONS;TDGA_CUSTOM
   platformArchitecture: {}
   scriptingBackend: {}
   il2cppCompilerConfiguration: {}

--
Gitblit v1.9.1