protected override void Setup(APIWrapperSettings settings)
        {
                        #if API_PROMO_BATCH
            BatchWrapperSettings batchSettings = settings as BatchWrapperSettings;
            if (batchSettings != null)
            {
                GameObject batchGO = new GameObject("Batch");
                GameObject.DontDestroyOnLoad(batchGO);

                _plugin = batchGO.AddComponent <BatchPlugin>();

                Config config = new Config();
                                #if UNITY_IPHONE
                config.IOSAPIKey = batchSettings.APIKey;
                                #elif UNITY_ANDROID
                config.AndroidAPIKey = batchSettings.APIKey;
                                #endif

                _plugin.Unlock.RedeemAutomaticOffer += new RedeemAutomaticOfferHandler(OnBatchRedeemAutomaticOffer);
                _plugin.Unlock.RedeemCodeSuccess    += new RedeemCodeSuccessHandler(OnBatchRedeemCodeSuccess);
                _plugin.Unlock.RedeemCodeFailed     += new RedeemCodeFailedHandler(OnBatchRedeemCodeFailed);
                _plugin.Unlock.RedeemURLCodeFound   += new RedeemURLCodeFoundHandler(OnBatchRedeemURLCodeFound);
                _plugin.Unlock.RedeemURLSuccess     += new RedeemURLSuccessHandler(OnBatchRedeemURLSuccess);
                _plugin.Unlock.RedeemURLFailed      += new RedeemURLFailedHandler(OnBatchRedeemURLFailed);
                _plugin.Unlock.RestoreSuccess       += new RestoreSuccessHandler(OnBatchRestoreSuccess);
                _plugin.Unlock.RestoreFailed        += new RestoreFailedHandler(OnBatchRestoreFailed);

                _plugin.StartPlugin(config);
            }
                        #endif

            SendInitializedEvent();             // TODO: temp
        }
 protected override void Setup(APIWrapperSettings settings)
 {
     _formattedPrices = new Dictionary <string, string>();
     _currencies      = new Dictionary <string, string>();
     _prices          = new Dictionary <string, decimal>();
     _pricesReceived  = false;
 }
Exemple #3
0
 protected override void Setup(APIWrapperSettings settings)
 {
                 #if API_ADS_HEYZAP
     HeyZapWrapperSettings heyzapSettings = settings as HeyZapWrapperSettings;
     if (heyzapSettings != null)
     {
         HeyzapAds.Start(heyzapSettings.APIKey, HeyzapAds.FLAG_NO_OPTIONS);
     }
                 #endif
 }
 protected override void Setup(APIWrapperSettings settings)
 {
                 #if UNITY_ANDROID
     if (!PlayGameServices.isSignedIn() && !PlayerDataManager.Instance.GameCenterLoginRequested)
     {
         ZedLogger.Log("trying to authenticate local player (silently)");
         PlayGameServices.attemptSilentAuthentication();
     }
                 #endif
 }
Exemple #5
0
        protected override void Setup(APIWrapperSettings settings)
        {
                        #if UNITY_IPHONE && API_SYNC_ICLOUD
            ICloudWrapperSettings icloudSettings = settings as ICloudWrapperSettings;
            if (icloudSettings != null)
            {
                _filename = icloudSettings.Filename;
            }

            _lastSync = new DateTime(1986, 1, 1);
            iCloudBinding.getUbiquityIdentityToken();
                        #endif
        }
 protected override void Setup(APIWrapperSettings settings)
 {
 }
 protected abstract void Setup(APIWrapperSettings settings);