|
- using System;
- using System.Collections.Generic;
- using CIG;
- using SUISS.Core;
- using UnityEngine;
-
- public sealed class CIGStoreManager : SingletonMonobehaviour<CIGStoreManager>
- {
- public IAPStore<CIG3StoreProduct> Store { get; private set; }
-
- public IAPShopProductConsumer IAPShopProductConsumer { get; private set; }
-
- public PurchaseHandler PurchaseHandler
- {
- get
- {
- return this._purchaseHandler;
- }
- }
-
- private void Start()
- {
- if (SingletonMonobehaviour<CIGWebService>.IsAvailable)
- {
- this.Store = new IAPStore<CIG3StoreProduct>(SingletonMonobehaviour<CIGWebService>.Instance, (Dictionary<string, object> 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;
- }
|