예제 #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");
 }