예제 #1
0
 public void RestoreButtonClick()
 {
     if (m_IsCloudMoolahStoreSelected)
     {
         // Restore abnornal transaction identifer, if Client don't receive transaction identifer.
         m_MoolahExtensions.RestoreTransactionID((RestoreTransactionIDState restoreTransactionIDState) =>
         {
             Debug.Log("restoreTransactionIDState = " + restoreTransactionIDState.ToString());
             bool success =
                 restoreTransactionIDState != RestoreTransactionIDState.RestoreFailed &&
                 restoreTransactionIDState != RestoreTransactionIDState.NotKnown;
             OnTransactionsRestored(success);
         });
     }
     else if (m_IsSamsungAppsStoreSelected)
     {
         m_SamsungExtensions.RestoreTransactions(OnTransactionsRestored);
     }
     else if (Application.platform == RuntimePlatform.WSAPlayerX86 ||
              Application.platform == RuntimePlatform.WSAPlayerX64 ||
              Application.platform == RuntimePlatform.WSAPlayerARM)
     {
         m_MicrosoftExtensions.RestoreTransactions();
     }
     else if (m_IsGooglePlayStoreSelected)
     {
         m_GooglePlayStoreExtensions.RestoreTransactions(OnTransactionsRestored);
     }
     else
     {
         m_AppleExtensions.RestoreTransactions(OnTransactionsRestored);
     }
 }
예제 #2
0
 /// <summary>
 /// Triggered when the user presses the restore button.
 /// </summary>
 public void RestoreButtonClick()
 {
     if (Application.platform == RuntimePlatform.WSAPlayerX86 ||
         Application.platform == RuntimePlatform.WSAPlayerX64 ||
         Application.platform == RuntimePlatform.WSAPlayerARM)
     {
         m_MicrosoftExtensions.RestoreTransactions();
     }
     else if (m_IsGooglePlayStoreSelected)
     {
         m_GooglePlayStoreExtensions.RestoreTransactions(OnTransactionsRestored);
     }
     else
     {
         m_AppleExtensions.RestoreTransactions(OnTransactionsRestored);
     }
 }
 public void Restore()
 {
     m_GooglePlayStoreExtensions.RestoreTransactions(OnRestore);
 }