// Use this for initialization void Start() { if (instance) { Destroy(gameObject); } else { Debug.Log("**********************\n**********************\nINITIALIZING AD SYSTEM"); instance = this; DontDestroyOnLoad(gameObject); InterstitialAdCount = PlayerPrefs.GetInt("InterstitialAdCount", InterstitialAdCount); InterstitialNextAdShow = PlayerPrefs.GetInt("InterstitialNextAdShow", InterstitialNextAdShow); #if UNITY_ANDROID adInterstitialUnitId = "YOUR-ANDROID-INTERSTITIAL-UNIT-ID"; adRewardedUnitId = "YOUR-ANDROID-REWARDED-UNIT-ID"; adBannerUnitId = "YOUR-ANDROID-BANNER-UNIT-ID"; #elif UNITY_IPHONE adInterstitialUnitId = "YOUR-IOS-INTERSTITIAL-UNIT-ID"; adRewardedUnitId = "YOUR-IOS-REWARDED-UNIT-ID"; adBannerUnitId = "YOUR-IOS-BANNER-UNIT-ID"; #endif RequestInterstitial(); RequestRewarded(); } }
public void ClickDestroyBanner() { RshkAds.DestroyBanner(); }
public void ClickHideBanner() { RshkAds.HideBanner(); }
public void ClickShowBanner() { RshkAds.ShowBanner(); }
public void ClickLoadInterstitial() { RshkAds.RequestInterstitial(); }
public void ClickLoadRewarded() { RshkAds.RequestRewarded(); }
public void ClickRewarded() { RshkAds.ShowRewarded(); }
public void ClickInterstitial() { RshkAds.ShowInterstitial(); }