Guest User

Untitled

a guest
Apr 5th, 2014
29
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using UnityEngine;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Collections;
  5. using Prime31;
  6.  
  7.  
  8. public class StoreKitHelper : MonoBehaviour {
  9.  
  10.     private static StoreKitHelper instance_;
  11.     private StoreKitHelper() {}
  12.  
  13.     #if UNITY_IOS
  14.     private List<StoreKitProduct> products_;
  15.     #elif UNITY_ANDROID
  16.     private List<GooglePurchase> purchases_;
  17.     private List<GoogleSkuInfo> skus_;
  18.     #endif
  19.  
  20.     public static StoreKitHelper Instance
  21.     {
  22.         get
  23.         {
  24.             if (instance_ == null)
  25.             {
  26.                 instance_ = new StoreKitHelper();
  27.                 instance_.Init();
  28.             }
  29.             return instance_;
  30.         }
  31.     }
  32.  
  33.     private void Init() {
  34.  
  35.     }
  36.  
  37.     public void Start() {
  38.         ;
  39.     }
  40.  
  41.  
  42. #if UNITY_IOS
  43.     public List<StoreKitProduct> GetProducts() {
  44.         return products_;
  45.     }
  46.  
  47.     public void SetProducts(List<StoreKitProduct> products) {
  48.         products_ = products;
  49.     }
  50.  
  51. #elif UNITY_ANDROID
  52.     public void SetProducts(List<GooglePurchase> purchases, List<GoogleSkuInfo> skus) {
  53.         purchases_ = purchases;
  54.         skus_ = skus;
  55.     }
  56. #endif
  57. }
RAW Paste Data