Advertisement
OwlyOwl

appodeal

Nov 29th, 2020
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.42 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using AppodealAds.Unity.Api;
  5. using AppodealAds.Unity.Common;
  6.  
  7.  
  8. public class AppodealManager : MonoBehaviour, IInterstitialAdListener, INonSkippableVideoAdListener, IBannerAdListener
  9. {
  10.     private string app_key = "2ecf45cbd688ba44119874ea51ced30cbbaa2c5e01802f05";
  11.  
  12.     private void Start()
  13.     {
  14.         Initialize(true);
  15.         ShowBanner();
  16.     }
  17.  
  18.     private void Initialize(bool isTesting)
  19.     {
  20.         Appodeal.setTesting(isTesting);
  21.         Appodeal.disableWriteExternalStoragePermissionCheck();
  22.         Appodeal.muteVideosIfCallsMuted(true);
  23.         Appodeal.initialize(app_key, Appodeal.INTERSTITIAL | Appodeal.NON_SKIPPABLE_VIDEO | Appodeal.BANNER_VIEW);
  24.     }
  25.  
  26.     public void ShowInterstitial()
  27.     {
  28.         if (Appodeal.isLoaded(Appodeal.INTERSTITIAL))
  29.         {
  30.             Appodeal.show(Appodeal.INTERSTITIAL);
  31.         }
  32.     }
  33.  
  34.     public void ShowNonSkippable()
  35.     {
  36.         if (Appodeal.canShow(Appodeal.NON_SKIPPABLE_VIDEO))
  37.         {
  38.             Appodeal.show(Appodeal.NON_SKIPPABLE_VIDEO);
  39.         }
  40.     }
  41.  
  42.     public void ShowBanner()
  43.     {
  44.         if (Appodeal.isLoaded(Appodeal.BANNER))
  45.         {
  46.             Appodeal.show(Appodeal.BANNER_BOTTOM);
  47.         }
  48.     }
  49.  
  50.     public void onInterstitialLoaded(bool isPrecache)
  51.     {
  52.         throw new System.NotImplementedException();
  53.     }
  54.  
  55.     public void onInterstitialFailedToLoad()
  56.     {
  57.         throw new System.NotImplementedException();
  58.     }
  59.  
  60.     public void onInterstitialShowFailed()
  61.     {
  62.         throw new System.NotImplementedException();
  63.     }
  64.  
  65.     public void onInterstitialShown()
  66.     {
  67.         throw new System.NotImplementedException();
  68.     }
  69.  
  70.     public void onInterstitialClosed()
  71.     {
  72.         throw new System.NotImplementedException();
  73.     }
  74.  
  75.     public void onInterstitialClicked()
  76.     {
  77.         throw new System.NotImplementedException();
  78.     }
  79.  
  80.     public void onInterstitialExpired()
  81.     {
  82.         throw new System.NotImplementedException();
  83.     }
  84.  
  85.     public void onNonSkippableVideoLoaded(bool isPrecache)
  86.     {
  87.         throw new System.NotImplementedException();
  88.     }
  89.  
  90.     public void onNonSkippableVideoFailedToLoad()
  91.     {
  92.         throw new System.NotImplementedException();
  93.     }
  94.  
  95.     public void onNonSkippableVideoShowFailed()
  96.     {
  97.         throw new System.NotImplementedException();
  98.     }
  99.  
  100.     public void onNonSkippableVideoShown()
  101.     {
  102.         throw new System.NotImplementedException();
  103.     }
  104.  
  105.     public void onNonSkippableVideoFinished()
  106.     {
  107.         throw new System.NotImplementedException();
  108.     }
  109.  
  110.     public void onNonSkippableVideoClosed(bool finished)
  111.     {
  112.         throw new System.NotImplementedException();
  113.     }
  114.  
  115.     public void onNonSkippableVideoExpired()
  116.     {
  117.         throw new System.NotImplementedException();
  118.     }
  119.  
  120.     public void onBannerLoaded(int height, bool isPrecache)
  121.     {
  122.         throw new System.NotImplementedException();
  123.     }
  124.  
  125.     public void onBannerFailedToLoad()
  126.     {
  127.         throw new System.NotImplementedException();
  128.     }
  129.  
  130.     public void onBannerShown()
  131.     {
  132.         throw new System.NotImplementedException();
  133.     }
  134.  
  135.     public void onBannerClicked()
  136.     {
  137.         throw new System.NotImplementedException();
  138.     }
  139.  
  140.     public void onBannerExpired()
  141.     {
  142.         throw new System.NotImplementedException();
  143.     }
  144. }
  145.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement