Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.
 
 
 

39 řádky
1.0 KiB

  1. using System;
  2. using System.Collections.Generic;
  3. using CIG;
  4. using SUISS.Core;
  5. using UnityEngine;
  6. public sealed class CIGStoreManager : SingletonMonobehaviour<CIGStoreManager>
  7. {
  8. public IAPStore<CIG3StoreProduct> Store { get; private set; }
  9. public IAPShopProductConsumer IAPShopProductConsumer { get; private set; }
  10. public PurchaseHandler PurchaseHandler
  11. {
  12. get
  13. {
  14. return this._purchaseHandler;
  15. }
  16. }
  17. private void Start()
  18. {
  19. if (SingletonMonobehaviour<CIGWebService>.IsAvailable)
  20. {
  21. this.Store = new IAPStore<CIG3StoreProduct>(SingletonMonobehaviour<CIGWebService>.Instance, (Dictionary<string, object> properties) => new CIG3StoreProduct(properties));
  22. base.StartCoroutine(this.Store.LoadProducts(false));
  23. this.IAPShopProductConsumer = new IAPShopProductConsumer();
  24. this._purchaseHandler.Init(this.Store);
  25. }
  26. else
  27. {
  28. UnityEngine.Debug.LogError("CIGWebService is null, cannot init IAPStore!");
  29. }
  30. }
  31. [SerializeField]
  32. private PurchaseHandler _purchaseHandler;
  33. }