Beispiel #1
0
    /**
     * Instance method.
     */
    public static SmartIAP Instance()
    {
        if (_instance == null)
        {
            _instance = new SmartIAP();
        }

        return(_instance);
    }
 public void Purchase(string sku, System.Action <bool, string> callBack)
 {
     callback = callBack;
     if (testMode)
     {
         sku = "android.test.purchased";
     }
     Debug.Log("sku is " + sku);
     SmartIAP.Instance().Purchase(sku);
 }
 void Awake()
 {
     // Do not modify the codes below.
     if (_instanceFound)
     {
         Destroy(gameObject);
         return;
     }
     _instanceFound = true;
     INSTANCE       = this;
     DontDestroyOnLoad(this);
     SmartIAP.Instance();
     InitGameController();
 }
 public void RestorePurchase(System.Action <bool, string> callBack)
 {
     callback = callBack;
     SmartIAP.Instance().RestoreCompletedTransactions();
 }