Пример #1
0
 public void Purchase(string productName)
 {
     if (IAPManager.Instance.IsInitialized())
     {
         IAPManager.Instance.PurchaseWithName(productName);
     }
     else
     {
         MobileNativeAlert.CreateOneButtonAlert("Service Unavailable", "Please check your internet connection.", "OK");
     }
 }
Пример #2
0
 public void RestorePurchases()
 {
     if (IAPManager.Instance.IsInitialized())
     {
         IAPManager.Instance.RestorePurchases();
     }
     else
     {
         MobileNativeAlert.CreateOneButtonAlert("Service Unavailable", "Please check your internet connection.", "OK");
     }
 }
Пример #3
0
 public void ShowAchievementUI()
 {
     if (GameServiceManager.Instance.IsInitialized)
     {
         GameServiceManager.Instance.ShowAchievementsUI();
     }
     else
     {
         #if UNITY_IOS
         MobileNativeAlert.CreateOneButtonAlert("Service Unavailable", "The player is not signed in to Game Center.", "OK");
         #elif UNITY_ANDROID
         GameServiceManager.Instance.Init();
         #endif
     }
 }
Пример #4
0
 // RestoreCompleted event is only fired on iOS devices.
 void OnRestoreCompleted()
 {
     MobileNativeAlert.CreateOneButtonAlert("Restore Completed", "Your purchases were restored successfully.", "OK");
 }