Exemplo n.º 1
0
        void NendAdInterstitial_OnFinishLoad(string message)
        {
            string[] array = message.Split(':');
            if (2 != array.Length)
            {
                return;
            }
            NendAdInterstitialStatusCode status = (NendAdInterstitialStatusCode)int.Parse(array [0]);
            string spotId = array [1];
            EventHandler <NendAdInterstitialLoadEventArgs> handler = AdLoaded;

            if (null != handler)
            {
                NendAdInterstitialLoadEventArgs args = new NendAdInterstitialLoadEventArgs();
                args.StatusCode = status;
                args.SpotId     = spotId;
                handler(this, args);
            }
            if (null != _callback)
            {
                if (_callback is NendAdInterstitialCallbackWithSpot)
                {
                    ((NendAdInterstitialCallbackWithSpot)_callback).OnFinishLoadInterstitialAd(status, spotId);
                }
                else
                {
                    _callback.OnFinishLoadInterstitialAd(status);
                }
            }
        }
Exemplo n.º 2
0
 public void OnFinishLoadInterstitialAd(object sender, NendAdInterstitialLoadEventArgs args)
 {
     switch (args.StatusCode) {
     case NendAdInterstitialStatusCode.SUCCESS:
         Debug.Log (">> OnFinishLoadInterstitialAd: SUCCESS");
         break;
     case NendAdInterstitialStatusCode.INVALID_RESPONSE_TYPE:
         Debug.Log (">> OnFinishLoadInterstitialAd: INVALID_RESPONSE_TYPE");
         break;
     case NendAdInterstitialStatusCode.FAILED_AD_REQUEST:
         Debug.Log (">> OnFinishLoadInterstitialAd: FAILED_AD_REQUEST");
         break;
     case NendAdInterstitialStatusCode.FAILED_AD_DOWNLOAD:
         Debug.Log (">> OnFinishLoadInterstitialAd: FAILED_AD_DOWNLOAD");
         break;
     }
 }
Exemplo n.º 3
0
    public void OnFinishLoadInterstitialAd(object sender, NendAdInterstitialLoadEventArgs args)
    {
        Handheld.StopActivityIndicator ();

        NendAdInterstitialStatusCode statusCode = args.StatusCode;
        switch (statusCode) {
        case NendAdInterstitialStatusCode.SUCCESS:
            // Move to the next scene when Interstitial-AD load completed.
            Debug.Log (">> OnFinishLoadInterstitialAd: SUCCESS");
            Application.LoadLevel ("First");
            break;
        default:
            // When failed to get of Interstitial-AD, try to reload.
            Debug.Log (">> OnFinishLoadInterstitialAd: FAILURE");
            ReloadAd ();
            break;
        }
    }
Exemplo n.º 4
0
        void NendAdInterstitial_OnFinishLoad(string message)
        {
            string[] array = message.Split(':');
            if (2 != array.Length)
            {
                return;
            }
            var    status = (NendAdInterstitialStatusCode)int.Parse(array [0]);
            string spotId = array [1];
            EventHandler <NendAdInterstitialLoadEventArgs> handler = AdLoaded;

            if (null != handler)
            {
                var args = new NendAdInterstitialLoadEventArgs();
                args.StatusCode = status;
                args.SpotId     = spotId;
                handler(this, args);
            }
        }
 void NendAdInterstitial_OnFinishLoad(string message)
 {
     string[] array = message.Split (':');
     if (2 != array.Length) {
         return;
     }
     NendAdInterstitialStatusCode status = (NendAdInterstitialStatusCode)int.Parse (array [0]);
     string spotId = array [1];
     EventHandler<NendAdInterstitialLoadEventArgs> handler = AdLoaded;
     if (null != handler) {
         NendAdInterstitialLoadEventArgs args = new NendAdInterstitialLoadEventArgs();
         args.StatusCode = status;
         args.SpotId = spotId;
         handler(this, args);
     }
     if (null != _callback) {
         if (_callback is NendAdInterstitialCallbackWithSpot) {
             ((NendAdInterstitialCallbackWithSpot)_callback).OnFinishLoadInterstitialAd (status, spotId);
         } else {
             _callback.OnFinishLoadInterstitialAd (status);
         }
     }
 }