From e371272a7885723c7b0ef31a20ae5d0fbead1d30 Mon Sep 17 00:00:00 2001
From: wangguan <wangguan@kt007.com>
Date: Sat, 26 Dec 2020 16:58:41 +0800
Subject: [PATCH] 12.26第二次

---
 Assets/Scripts/GameAnalytics_SDK/TDAA_SDKManager.cs |   36 +++++++++++++++++++-----------------
 1 files changed, 19 insertions(+), 17 deletions(-)

diff --git a/Assets/Scripts/GameAnalytics_SDK/TDAA_SDKManager.cs b/Assets/Scripts/GameAnalytics_SDK/TDAA_SDKManager.cs
index 7759e88..670e536 100644
--- a/Assets/Scripts/GameAnalytics_SDK/TDAA_SDKManager.cs
+++ b/Assets/Scripts/GameAnalytics_SDK/TDAA_SDKManager.cs
@@ -43,11 +43,12 @@
 
         maxLevel = PlayerPrefs.GetInt(maxLevelStr);
         maxWave = PlayerPrefs.GetInt(maxWaveStr);
-        AddListener();
+        //AddListener();
     }
 
-    private void AddListener()
+    public void AddListener()
     {
+        //Debug.Log("AddListener");
         EventCenter.Ins.Add<int, int>((int)KTGMGemClient.EventType.EndlessCompletedPort, EndlessCompletedPort);
         EventCenter.Ins.Add((int)KTGMGemClient.EventType.EndlessLevelCompleted, EndlessLevelCompleted);
     }
@@ -67,6 +68,7 @@
     /// </summary>
     private void EndlessLevelCompleted()
     {
+        //CommonDebugHelper.Debug("无尽模式完成,开始传各种");
         OnUseSkill(GameConfig.EndlessPortUseSkillTowerCount);
         OnOpenTower(GameConfig.EndlessOpenAttackTowerCount);
         OnClickTowerBuyBtn(GameConfig.EndlessBuyTowerCount);
@@ -74,7 +76,7 @@
 
     public void Reset()
     {
-        Debug.LogError("清除了数据");
+        CommonDebugHelper.Debug("清除了数据");
         //PlayerPrefs.DeleteAll();
         isFirstStart = PlayerPrefs.GetInt(firstStart) == 0;
         statisticsStep = PlayerPrefs.GetInt(statisticsStr);
@@ -105,7 +107,7 @@
     //注册
     public void OnRegister()
     {
-        TalkingDataPlugin.OnRegister(GetDeviceId(), TalkingDataAccountType.ANONYMOUS, "testwgname");
+        TalkingDataPlugin.OnRegister(GameConfig.Imei, TalkingDataAccountType.ANONYMOUS, GameConfig.Imei);
     }
 
     /// <summary>
@@ -113,7 +115,7 @@
     /// </summary>
     public void Login()
     {
-        TalkingDataPlugin.OnLogin(GetDeviceId(), TalkingDataAccountType.ANONYMOUS, "testwgname");
+        TalkingDataPlugin.OnLogin(GameConfig.Imei, TalkingDataAccountType.ANONYMOUS, GameConfig.Imei);
     }
 
     /*
@@ -162,7 +164,7 @@
         {
             OnRegister();
 
-            Debug.LogError("注册人数统计");
+            CommonDebugHelper.Debug("注册人数统计");
             //只记录一次
             Dictionary<string, object> dic = new Dictionary<string, object>
             {
@@ -229,7 +231,7 @@
             // };
             //dic[key] = 1;
 
-            Debug.LogError("漏斗流统计:" + key);
+            //CommonDebugHelper.Debug("漏斗流统计:" + key);
 
             OnEvent(key, dic);
             statisticsStep = step;
@@ -247,7 +249,7 @@
     {
         if (step > guideStep)
         {
-            Debug.LogError("引导步数统计:" + step);
+            CommonDebugHelper.Debug("引导步数统计:" + step);
             Dictionary<string, object> dic = new Dictionary<string, object>
             {
                 { "Guide", step.ToString()}
@@ -262,7 +264,7 @@
     //5.每次游玩过程中,点击【重新开始】按钮的次数,每次重新开始记做一轮
     public void OnClickRestartBtn()
     {
-        Debug.LogError("重新开始按钮次数");
+        CommonDebugHelper.Debug("重新开始按钮次数");
         Dictionary<string, object> dic = new Dictionary<string, object>
         {
             { "OnClickRestartBtn", 1}
@@ -273,7 +275,7 @@
     //7.每一轮游戏中成功使用技能宝石的次数
     public void OnUseSkill(int count)
     {
-        Debug.LogError("每一轮游戏中成功使用技能宝石的次数:" + count);
+        CommonDebugHelper.Debug("每一轮游戏中成功使用技能宝石的次数:" + count);
         Dictionary<string, object> dic = new Dictionary<string, object>
         {
             { "使用次数", count+"次"}
@@ -284,7 +286,7 @@
     //8.每一轮游戏中成功开启的塔位置数量
     public void OnOpenTower(int towerCount)
     {
-        Debug.LogError("每一轮游戏中成功开启的塔位置数量:" + towerCount);
+        CommonDebugHelper.Debug("每一轮游戏中成功开启的塔位置数量:" + towerCount);
         Dictionary<string, object> dic = new Dictionary<string, object>
         {
             { "购买次数", towerCount+"次"}
@@ -295,7 +297,7 @@
     //9.每一轮游戏中成功购买塔的数量
     public void OnClickTowerBuyBtn(int buyCount)
     {
-        Debug.LogError("每一轮游戏中成功购买塔的数量:" + buyCount);
+        CommonDebugHelper.Debug("每一轮游戏中成功购买塔的数量:" + buyCount);
         Dictionary<string, object> dic = new Dictionary<string, object>
         {
             { "购买次数", buyCount+"次"}
@@ -306,7 +308,7 @@
     //10.玩家在结算界面点击【对pvp感兴趣】按钮次数
     public void OnClickPVPBtn()
     {
-        Debug.LogError("对pvp感兴趣");
+        CommonDebugHelper.Debug("对pvp感兴趣");
         Dictionary<string, object> dic = new Dictionary<string, object>
         {
             { "OnClickPVPBtn", 1}
@@ -341,7 +343,7 @@
             maxWave = wave;
             PlayerPrefs.SetInt(maxWaveStr, maxWave);
 
-            Debug.LogError($"玩家最高打到第{level}关{wave}波");
+            CommonDebugHelper.Debug($"玩家最高打到第{level}关{wave}波");
             Dictionary<string, object> dic = new Dictionary<string, object>
             {
                 { "MaxWave", $"第{level}关{wave}波"}
@@ -357,12 +359,12 @@
     /// <param name="wave">第几波</param>
     public void WaveDone(int level, int wave)
     {
-        Debug.Log($"玩家达到第{level}关{wave}波");
+        CommonDebugHelper.Debug($"玩家达到第{level}关{wave}波");
         Dictionary<string, object> dic = new Dictionary<string, object>
         {
-            { $"第{level}关{wave}波", 1}
+            { $"第{level}关", 1}
         };
-        OnEvent("玩家完成第x关y波的次数", dic);
+        OnEvent("玩家完成第x关的次数", dic);
     }
 
 

--
Gitblit v1.9.1