From 8637f933a9987b4b16dd9725189a1c6ee2685118 Mon Sep 17 00:00:00 2001 From: River Jiang <546213258@qq.com> Date: Wed, 28 Oct 2020 10:12:05 +0800 Subject: [PATCH] 提交充能条特效修改 Merge branch 'master' of http://172.16.1.52:8090/r/GemBattle into master --- Assets/Scripts/GameAnalytics_SDK/UI/LoginUI.cs | 39 ++++++++++++++++++++++++++++----------- 1 files changed, 28 insertions(+), 11 deletions(-) diff --git a/Assets/Scripts/GameAnalytics_SDK/UI/LoginUI.cs b/Assets/Scripts/GameAnalytics_SDK/UI/LoginUI.cs index 038712f..5a0c4af 100644 --- a/Assets/Scripts/GameAnalytics_SDK/UI/LoginUI.cs +++ b/Assets/Scripts/GameAnalytics_SDK/UI/LoginUI.cs @@ -19,20 +19,22 @@ void Start() { GA_SDK_Manager.Ins.SDKInit(ChannelID.Gm.ToString()); + GA_SDK_Manager.Ins.Statistics(1);//成功加载登陆界面的人数 isLogining = false; transform.Find("Panel/Button").GetComponent<Button>().onClick.AddListener(OnClickLoginBtn); - // if (Application.platform == RuntimePlatform.Android) - // { - // GetetDeviceIMEI();//获取安卓手机IMEI - // } - // else if (Application.platform == RuntimePlatform.WindowsEditor) - // { - // imei0 = "MyTestGemBattle1"; - // } + if (Application.platform == RuntimePlatform.Android) + { + //GetetDeviceIMEI();//获取安卓手机IMEI + imei0 = GA_SDK_Manager.Ins.GetDeviceId();//使用设备ID + } + else if (Application.platform == RuntimePlatform.WindowsEditor) + { + imei0 = "MyTestGemBattle123"; + } - imei0 = GA_SDK_Manager.Ins. GetDeviceId();//使用设备ID + } @@ -69,8 +71,8 @@ private void OnClickLoginBtn() { - Debug.Log("登录"); LoginRequest(); + GA_SDK_Manager.Ins.Statistics(2);//埋点 } @@ -82,6 +84,19 @@ { if (!isLogining) { + Debug.Log("登录"); + if (Application.platform == RuntimePlatform.WindowsEditor) + { + Debug.Log("编辑器直接登录"); + + GA_SDK_Manager.Ins.Login(imei0); + GA_SDK_Manager.Ins.Statistics(3);//埋点 + + //StartCoroutine(loginMy()); + StartCoroutine(LoadScene()); + return; + } + isLogining = true; string url = GameConfig.IsDebug ? GameConfig.TestLoginUrl : GameConfig.LoginUrl; JsonData data = new JsonData(); @@ -163,9 +178,11 @@ if (login.Errorcode == 0) { Debug.Log("--------------------- 登录成功 ---------------------"); - UserDataMsg userData = login.Userdata; + //UserDataMsg userData = login.Userdata; GA_SDK_Manager.Ins.Login(imei0); + GA_SDK_Manager.Ins.Statistics(3);//埋点 + //StartCoroutine(loginMy()); StartCoroutine(LoadScene()); -- Gitblit v1.9.1