diff options
| author | aldrikboy <aldrikboy@gmail.com> | 2018-01-18 12:34:12 +0100 |
|---|---|---|
| committer | aldrikboy <aldrikboy@gmail.com> | 2018-01-18 12:34:12 +0100 |
| commit | a49c13ab80a76ec81f36d6cbc8c37721f24f828c (patch) | |
| tree | c5d717cb301459b4f83c7a364b8e3676e90bafc7 /Penguloon/AdManager.cs | |
| parent | 2cb22a74aed80e2cce68f16b0821a690c7c05b7a (diff) | |
ads?
Diffstat (limited to 'Penguloon/AdManager.cs')
| -rw-r--r-- | Penguloon/AdManager.cs | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/Penguloon/AdManager.cs b/Penguloon/AdManager.cs new file mode 100644 index 0000000..af49d17 --- /dev/null +++ b/Penguloon/AdManager.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +using Android.App; +using Android.Content; +using Android.OS; +using Android.Runtime; +using Android.Views; +using Android.Widget; + +using Android.Gms.Ads; +using System.Threading; + +namespace Penguloon +{ + /// <summary> + /// app id: ca-app-pub-5292616698166001~9916384676 + /// </summary> + /// + public static class AdManager + { + public static InterstitialAd GameOverAd { get; set; } + + public static void Load(Main main) + { + GameOverAd = new InterstitialAd(main.Context); + GameOverAd.AdUnitId = "ca-app-pub-5292616698166001/6013632836"; + GameOverAd.LoadAd(new AdRequest.Builder().Build()); + } + + public static void ShowGameOverAd() + { + if (GameOverAd.IsLoaded) + GameOverAd.Show(); + } + } +}
\ No newline at end of file |
