12345678910111213141516171819202122232425262728293031323334353637 |
- using UnityEngine;
- using System.Collections.Generic;
- public class StoreManager : GenericStoreManager<StoreProductId>
- {
- public ScreenBase progressIndicator;
- public override string GetAndroidKey()
- {
- return "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0c81kDu1X9i9cIPgFPhYYp99cnzi19yFZmO/RLkB5WNnJTE/iXmR+J7pF0gyTR5H83MpZtK4zMvo/ZtnPgmzaASbg2njYFxpNpt8XEmDv2/6ZoOvB6dZKbnnNd/Admjs/gTnGrtLza1uvXBNvefkw6PCV8dktjmLI6GuADiXobO+lmWygADKlFxN+nxY2gmEjBW0Z+FHASTAl82U7PxW+sbjfmuMQiehMKCqI99LLd/Xu5pWh66danvuJNT4+kmOr2rzrKkXisVyuKreoabp2R/cgu5HlLQyss1Na5ydorMDVWW0Rdvggd/4kugoYhFYr3U2qwc67iQdcX28a0wpQQIDAQAB";
- }
- protected override void Start()
- {
- base.Start();
- CoreNotificationCenter.AddListener(OnPurchaseInProgress, CoreNotificationType.PurchaseInProgress);
- CoreNotificationCenter.AddListener(OnPurchaseFinished, CoreNotificationType.PurchaseSuccessful);
- CoreNotificationCenter.AddListener(OnPurchaseFinished, CoreNotificationType.PurchaseFailed);
- }
- void OnDestroy()
- {
- CoreNotificationCenter.RemoveListener(OnPurchaseInProgress, CoreNotificationType.PurchaseInProgress);
- CoreNotificationCenter.RemoveListener(OnPurchaseFinished, CoreNotificationType.PurchaseSuccessful);
- CoreNotificationCenter.RemoveListener(OnPurchaseFinished, CoreNotificationType.PurchaseFailed);
- }
- void OnPurchaseInProgress(CoreNotification note)
- {
- progressIndicator.Show();
- }
- void OnPurchaseFinished(CoreNotification note)
- {
- progressIndicator.Hide();
- }
- }
|