예제 #1
0
 // 账号
 public static void SetAccount(string accountId)
 {
     if (bInit)
     {
         msAccount = TDGAAccount.SetAccount(accountId);
     }
 }
예제 #2
0
        public static TDGAAccount SetAccount(string accountId)
        {
            TDGAAccount account = new TDGAAccount();

            //if the platform is real device
            if (Application.platform != RuntimePlatform.OSXEditor && Application.platform != RuntimePlatform.WindowsEditor)
            {
#if UNITY_IPHONE
                _tdgaSetAccount(accountId);
#elif UNITY_ANDROID
                AndroidJavaObject jobj = agent.CallStatic <AndroidJavaObject>("setAccount", accountId);
                account.setAccountObject(jobj);
#elif UNITY_WP8
                TalkingDataGAWP.TDGAAccount csObj = TalkingDataGAWP.TDGAAccount.setAccount(accountId);
                account.setAccountObject(csObj);
#endif
            }

            return(account);
        }