Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using AppodealAds.Unity.Api;
- using AppodealAds.Unity.Common;
- public class AppodealManager : MonoBehaviour, IInterstitialAdListener, INonSkippableVideoAdListener, IBannerAdListener
- {
- private string app_key = "2ecf45cbd688ba44119874ea51ced30cbbaa2c5e01802f05";
- private void Start()
- {
- Initialize(true);
- ShowBanner();
- }
- private void Initialize(bool isTesting)
- {
- Appodeal.setTesting(isTesting);
- Appodeal.disableWriteExternalStoragePermissionCheck();
- Appodeal.muteVideosIfCallsMuted(true);
- Appodeal.initialize(app_key, Appodeal.INTERSTITIAL | Appodeal.NON_SKIPPABLE_VIDEO | Appodeal.BANNER_VIEW);
- }
- public void ShowInterstitial()
- {
- if (Appodeal.isLoaded(Appodeal.INTERSTITIAL))
- {
- Appodeal.show(Appodeal.INTERSTITIAL);
- }
- }
- public void ShowNonSkippable()
- {
- if (Appodeal.canShow(Appodeal.NON_SKIPPABLE_VIDEO))
- {
- Appodeal.show(Appodeal.NON_SKIPPABLE_VIDEO);
- }
- }
- public void ShowBanner()
- {
- if (Appodeal.isLoaded(Appodeal.BANNER))
- {
- Appodeal.show(Appodeal.BANNER_BOTTOM);
- }
- }
- public void onInterstitialLoaded(bool isPrecache)
- {
- throw new System.NotImplementedException();
- }
- public void onInterstitialFailedToLoad()
- {
- throw new System.NotImplementedException();
- }
- public void onInterstitialShowFailed()
- {
- throw new System.NotImplementedException();
- }
- public void onInterstitialShown()
- {
- throw new System.NotImplementedException();
- }
- public void onInterstitialClosed()
- {
- throw new System.NotImplementedException();
- }
- public void onInterstitialClicked()
- {
- throw new System.NotImplementedException();
- }
- public void onInterstitialExpired()
- {
- throw new System.NotImplementedException();
- }
- public void onNonSkippableVideoLoaded(bool isPrecache)
- {
- throw new System.NotImplementedException();
- }
- public void onNonSkippableVideoFailedToLoad()
- {
- throw new System.NotImplementedException();
- }
- public void onNonSkippableVideoShowFailed()
- {
- throw new System.NotImplementedException();
- }
- public void onNonSkippableVideoShown()
- {
- throw new System.NotImplementedException();
- }
- public void onNonSkippableVideoFinished()
- {
- throw new System.NotImplementedException();
- }
- public void onNonSkippableVideoClosed(bool finished)
- {
- throw new System.NotImplementedException();
- }
- public void onNonSkippableVideoExpired()
- {
- throw new System.NotImplementedException();
- }
- public void onBannerLoaded(int height, bool isPrecache)
- {
- throw new System.NotImplementedException();
- }
- public void onBannerFailedToLoad()
- {
- throw new System.NotImplementedException();
- }
- public void onBannerShown()
- {
- throw new System.NotImplementedException();
- }
- public void onBannerClicked()
- {
- throw new System.NotImplementedException();
- }
- public void onBannerExpired()
- {
- throw new System.NotImplementedException();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement