| | |
| | | // Start is called before the first frame update |
| | | void Start() |
| | | { |
| | | GA_SDK_Manager.Ins.SDKInit(ChannelID.Gm.ToString()); |
| | | GA_SDK_Manager.Ins.Statistics(1);//成功加载登陆界面的人数 |
| | | TDAA_SDKManager.Ins.SDKInit(ChannelID.Gm.ToString()); |
| | | TDAA_SDKManager.Ins.Statistics(1);//成功加载登陆界面的人数 |
| | | isLogining = false; |
| | | |
| | | transform.Find("Panel/Button").GetComponent<Button>().onClick.AddListener(OnClickLoginBtn); |
| | | transform.Find("Panel/Button (1)").GetComponent<Button>().onClick.AddListener(OnClickResetBtn); |
| | | |
| | | if (Application.platform == RuntimePlatform.Android) |
| | | { |
| | | //GetetDeviceIMEI();//获取安卓手机IMEI |
| | | imei0 = GA_SDK_Manager.Ins.GetDeviceId();//使用设备ID |
| | | imei0 = TDAA_SDKManager.Ins.GetDeviceId();//使用设备ID |
| | | } |
| | | else if (Application.platform == RuntimePlatform.WindowsEditor) |
| | | { |
| | |
| | | |
| | | #endregion |
| | | |
| | | private void OnClickResetBtn() |
| | | { |
| | | Debug.LogError("清空了所有数据"); |
| | | PlayerPrefs.DeleteAll(); |
| | | TDAA_SDKManager.Ins.Reset(); |
| | | } |
| | | |
| | | |
| | | private void OnClickLoginBtn() |
| | | { |
| | | LoginRequest(); |
| | | GA_SDK_Manager.Ins.Statistics(2);//埋点 |
| | | if (!isLogining) |
| | | { |
| | | AudioSourceManager.Ins.Play(AudioEnum.UI); |
| | | TDAA_SDKManager.Ins.Statistics(2);//埋点 |
| | | |
| | | //StartCoroutine(loginMy()); |
| | | StartCoroutine(LoadScene()); |
| | | }else{ |
| | | |
| | | } |
| | | |
| | | //TDAA_SDKManager.Ins.Statistics(2);//埋点 |
| | | //LoginRequest(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | Debug.Log("编辑器直接登录"); |
| | | |
| | | GA_SDK_Manager.Ins.Login(imei0); |
| | | GA_SDK_Manager.Ins.Statistics(3);//埋点 |
| | | //TDAA_SDKManager.Ins.Login(); |
| | | //TDAA_SDKManager.Ins.Statistics(3);//埋点 |
| | | |
| | | //StartCoroutine(loginMy()); |
| | | StartCoroutine(LoadScene()); |
| | |
| | | Debug.Log("--------------------- 登录成功 ---------------------"); |
| | | //UserDataMsg userData = login.Userdata; |
| | | |
| | | GA_SDK_Manager.Ins.Login(imei0); |
| | | GA_SDK_Manager.Ins.Statistics(3);//埋点 |
| | | //TDAA_SDKManager.Ins.Login(); |
| | | //TDAA_SDKManager.Ins.Statistics(3);//埋点 |
| | | |
| | | //StartCoroutine(loginMy()); |
| | | StartCoroutine(LoadScene()); |