// Shows the rewarding ad on the screen. public void Show() { if (prefabAd != null) { dummyAd = AdBehaviour.ShowAd(prefabAd, new Vector3(0, 0, 1)); AdBehaviour.PauseGame(); CreateButtonBehavior(); AddClickBehavior(dummyAd); dummyAd.AddComponent <Countdown>(); if (OnAdDidPresentFullScreenContent != null) { OnAdDidPresentFullScreenContent.Invoke(this, EventArgs.Empty); } } else { if (OnAdFailedToPresentFullScreenContent != null) { OnAdFailedToPresentFullScreenContent.Invoke(this, new AdErrorClientEventArgs() { AdErrorClient = new AdErrorClient() }); } } }
// Shows the InterstitialAd. public void Show() { if (prefabAd != null) { dummyAd = AdBehaviour.ShowAd(prefabAd, new Vector3(0, 0, 1)); CreateButtonBehavior(); AddClickBehavior(dummyAd); AdBehaviour.PauseGame(); if (OnAdDidPresentFullScreenContent != null) { OnAdDidPresentFullScreenContent.Invoke(this, EventArgs.Empty); } } else { Debug.Log("No Ad Loaded"); } }