public void HandlePaidEvent(object sender, AdValueEventArgs args)
    {
        print("Rewarded interstitial ad has received a paid event.");
        this.rewardedInterstitial.OnPaidEvent -= HandlePaidEvent;

        //to do: representacion visual de recompensa

        if (GameManagerActions.instance.isPaused)
        {
            GameManagerActions.instance.StartCoroutine(GameManagerActions.instance.DelayedResume());
        }
        FindObjectOfType <Gun>().UnBlockGun();

        //base.HandleOnAdOpened(sender, args);
    }
Exemple #2
0
        public void onPaidEvent(int precision, long valueInMicros, string currencyCode)
        {
            if (this.OnPaidEvent != null)
            {
                AdValue adValue = new AdValue()
                {
                    Precision    = (AdValue.PrecisionType)precision,
                    Value        = valueInMicros,
                    CurrencyCode = currencyCode
                };
                AdValueEventArgs args = new AdValueEventArgs()
                {
                    AdValue = adValue
                };

                this.OnPaidEvent(this, args);
            }
        }
Exemple #3
0
        private static void RewardedInterstitialAdPaidEventCallback(
            IntPtr rewardedInterstitialAdClient, int precision, long value, string currencyCode)
        {
            RewardedInterstitialAdClient client = IntPtrToRewardedInterstitialAdClient(rewardedInterstitialAdClient);

            if (client.OnPaidEvent != null)
            {
                AdValue adValue = new AdValue()
                {
                    Precision    = (AdValue.PrecisionType)precision,
                    Value        = value,
                    CurrencyCode = currencyCode
                };
                AdValueEventArgs args = new AdValueEventArgs()
                {
                    AdValue = adValue
                };

                client.OnPaidEvent(client, args);
            }
        }
        private static void AdViewPaidEventCallback(
            IntPtr bannerClient, int precision, long value, string currencyCode)
        {
            BannerClient client = IntPtrToBannerClient(bannerClient);

            if (client.OnPaidEvent != null)
            {
                AdValue adValue = new AdValue()
                {
                    Precision    = (AdValue.PrecisionType)precision,
                    Value        = value,
                    CurrencyCode = currencyCode
                };
                AdValueEventArgs args = new AdValueEventArgs()
                {
                    AdValue = adValue
                };

                client.OnPaidEvent(client, args);
            }
        }
Exemple #5
0
 public void HandlePaidEvent(object sender, AdValueEventArgs args)
 {
     onPaidEvent?.Invoke((int)args.AdValue.Precision, args.AdValue.Value, args.AdValue.CurrencyCode);
 }
Exemple #6
0
 void HandlePaidEvent(object sender, AdValueEventArgs e)
 {
     PlatformInterface.instance.logger.Log($"{nameof(PlatformAdMobAdsInit)}.{nameof(HandlePaidEvent)}");
 }
Exemple #7
0
 private void HandlePaidEvent(object sender, AdValueEventArgs args)
 {
     MonoBehaviour.print(
         "Rewarded interstitial ad has received a paid event.");
 }