diff options
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 |
