Beispiel #1
0
        void NendAdInterstitial_OnShowAd(string message)
        {
            string[] array = message.Split(':');
            if (2 != array.Length)
            {
                return;
            }
            NendAdInterstitialShowResult result = (NendAdInterstitialShowResult)int.Parse(array [0]);
            string spotId = array [1];
            EventHandler <NendAdInterstitialShowEventArgs> handler = AdShown;

            if (null != handler)
            {
                NendAdInterstitialShowEventArgs args = new NendAdInterstitialShowEventArgs();
                args.ShowResult = result;
                args.SpotId     = spotId;
                handler(this, args);
            }
            if (null != _callback)
            {
                if (_callback is NendAdInterstitialCallbackWithSpot)
                {
                    ((NendAdInterstitialCallbackWithSpot)_callback).OnShowInterstitialAd(result, spotId);
                }
                else
                {
                    _callback.OnShowInterstitialAd(result);
                }
            }
        }
Beispiel #2
0
        void NendAdInterstitial_OnShowAd(string message)
        {
            string[] array = message.Split(':');
            if (2 != array.Length)
            {
                return;
            }
            var    result = (NendAdInterstitialShowResult)int.Parse(array [0]);
            string spotId = array [1];
            EventHandler <NendAdInterstitialShowEventArgs> handler = AdShown;

            if (null != handler)
            {
                var args = new NendAdInterstitialShowEventArgs();
                args.ShowResult = result;
                args.SpotId     = spotId;
                handler(this, args);
            }
        }
 public void OnShowInterstitialAd(object sender, NendAdInterstitialShowEventArgs args)
 {
     switch (args.ShowResult) {
     case NendAdInterstitialShowResult.AD_SHOW_SUCCESS:
         Debug.Log (">> OnShowInterstitialAd: AD_SHOW_SUCCESS");
         break;
     case NendAdInterstitialShowResult.AD_SHOW_ALREADY:
         Debug.Log (">> OnShowInterstitialAd: AD_SHOW_ALREADY");
         break;
     case NendAdInterstitialShowResult.AD_REQUEST_INCOMPLETE:
         Debug.Log (">> OnShowInterstitialAd: AD_REQUEST_INCOMPLETE");
         break;
     case NendAdInterstitialShowResult.AD_LOAD_INCOMPLETE:
         Debug.Log (">> OnShowInterstitialAd: AD_LOAD_INCOMPLETE");
         break;
     case NendAdInterstitialShowResult.AD_FREQUENCY_NOT_RECHABLE:
         Debug.Log (">> OnShowInterstitialAd: AD_FREQUENCY_NOT_RECHABLE");
         break;
     case NendAdInterstitialShowResult.AD_DOWNLOAD_INCOMPLETE:
         Debug.Log (">> OnShowInterstitialAd: AD_DOWNLOAD_INCOMPLETE");
         break;
     }
 }
 void NendAdInterstitial_OnShowAd(string message)
 {
     string[] array = message.Split (':');
     if (2 != array.Length) {
         return;
     }
     NendAdInterstitialShowResult result = (NendAdInterstitialShowResult)int.Parse (array [0]);
     string spotId = array [1];
     EventHandler<NendAdInterstitialShowEventArgs> handler = AdShown;
     if (null != handler) {
         NendAdInterstitialShowEventArgs args = new NendAdInterstitialShowEventArgs();
         args.ShowResult = result;
         args.SpotId = spotId;
         handler(this, args);
     }
     if (null != _callback) {
         if (_callback is NendAdInterstitialCallbackWithSpot) {
             ((NendAdInterstitialCallbackWithSpot)_callback).OnShowInterstitialAd (result, spotId);
         } else {
             _callback.OnShowInterstitialAd (result);
         }
     }
 }