using System; using System.Collections.Generic; using CIG; using SUISS.Core; using UnityEngine; public sealed class CIGStoreManager : SingletonMonobehaviour { public IAPStore Store { get; private set; } public IAPShopProductConsumer IAPShopProductConsumer { get; private set; } public PurchaseHandler PurchaseHandler { get { return this._purchaseHandler; } } private void Start() { if (SingletonMonobehaviour.IsAvailable) { this.Store = new IAPStore(SingletonMonobehaviour.Instance, (Dictionary properties) => new CIG3StoreProduct(properties)); base.StartCoroutine(this.Store.LoadProducts(false)); this.IAPShopProductConsumer = new IAPShopProductConsumer(); this._purchaseHandler.Init(this.Store); } else { UnityEngine.Debug.LogError("CIGWebService is null, cannot init IAPStore!"); } } [SerializeField] private PurchaseHandler _purchaseHandler; }