コード例 #1
0
 // Token: 0x0600029C RID: 668 RVA: 0x0000E3B8 File Offset: 0x0000C7B8
 private RewardBasedVideoAd()
 {
     this.client = GoogleMobileAdsClientFactory.BuildRewardBasedVideoAdClient();
     this.client.CreateRewardBasedVideoAd();
     this.client.OnAdLoaded += delegate(object sender, EventArgs args)
     {
         if (this.OnAdLoaded != null)
         {
             this.OnAdLoaded(this, args);
         }
     };
     this.client.OnAdFailedToLoad += delegate(object sender, AdFailedToLoadEventArgs args)
     {
         if (this.OnAdFailedToLoad != null)
         {
             this.OnAdFailedToLoad(this, args);
         }
     };
     this.client.OnAdOpening += delegate(object sender, EventArgs args)
     {
         if (this.OnAdOpening != null)
         {
             this.OnAdOpening(this, args);
         }
     };
     this.client.OnAdStarted += delegate(object sender, EventArgs args)
     {
         if (this.OnAdStarted != null)
         {
             this.OnAdStarted(this, args);
         }
     };
     this.client.OnAdClosed += delegate(object sender, EventArgs args)
     {
         if (this.OnAdClosed != null)
         {
             this.OnAdClosed(this, args);
         }
     };
     this.client.OnAdLeavingApplication += delegate(object sender, EventArgs args)
     {
         if (this.OnAdLeavingApplication != null)
         {
             this.OnAdLeavingApplication(this, args);
         }
     };
     this.client.OnAdRewarded += delegate(object sender, Reward args)
     {
         if (this.OnAdRewarded != null)
         {
             this.OnAdRewarded(this, args);
         }
     };
 }
コード例 #2
0
        // Creates a Singleton RewardBasedVideoAd.
        private RewardBasedVideoAd()
        {
            client = GoogleMobileAdsClientFactory.BuildRewardBasedVideoAdClient();
            client.CreateRewardBasedVideoAd();

            this.client.OnAdLoaded += (sender, args) =>
            {
                if (this.OnAdLoaded != null)
                {
                    this.OnAdLoaded(this, args);
                }
            };

            this.client.OnAdFailedToLoad += (sender, args) =>
            {
                if (this.OnAdLoaded != null)
                {
                    this.OnAdLoaded(this, args);
                }
            };

            this.client.OnAdOpening += (sender, args) =>
            {
                if (this.OnAdOpening != null)
                {
                    this.OnAdOpening(this, args);
                }
            };

            this.client.OnAdStarted += (sender, args) =>
            {
                if (this.OnAdStarted != null)
                {
                    this.OnAdStarted(this, args);
                }
            };

            this.client.OnAdClosed += (sender, args) =>
            {
                if (this.OnAdClosed != null)
                {
                    this.OnAdClosed(this, args);
                }
            };

            this.client.OnAdLeavingApplication += (sender, args) =>
            {
                if (this.OnAdLeavingApplication != null)
                {
                    this.OnAdLeavingApplication(this, args);
                }
            };

            this.client.OnAdRewarded += (sender, args) =>
            {
                if (this.OnAdRewarded != null)
                {
                    this.OnAdRewarded(this, args);
                }
            };
        }