Beispiel #1
0
 public void SetCallback(string message)
 {
     if (HZInterstitialAd.adDisplayListener != null)
     {
         HZInterstitialAd.adDisplayListener(message, "");
     }
 }
Beispiel #2
0
 protected static void SetCallbackStateAndTag(string state, string tag)
 {
     if (HZInterstitialAd.adDisplayListener != null)
     {
         HZInterstitialAd.adDisplayListener(state, tag);
     }
 }
Beispiel #3
0
 public static void show(string tag)
 {
     HZInterstitialAd.ShowWithOptions(new HZIncentivizedShowOptions
     {
         Tag = tag
     });
 }
Beispiel #4
0
        public static void show(string tag)
        {
            HZIncentivizedShowOptions showOptions = new HZIncentivizedShowOptions();

            showOptions.Tag = tag;
            HZInterstitialAd.ShowWithOptions(showOptions);;
        }
Beispiel #5
0
 // Token: 0x060000DB RID: 219 RVA: 0x000039AC File Offset: 0x00001BAC
 public void SetCallback(string message)
 {
     string[] array = message.Split(new char[]
     {
         ','
     });
     HZInterstitialAd.SetCallbackStateAndTag(array[0], array[1]);
 }
Beispiel #6
0
 // Token: 0x06000074 RID: 116 RVA: 0x00002F50 File Offset: 0x00001150
 public static void Start(string publisher_id, int options)
 {
     HeyzapAdsAndroid.Start(publisher_id, options);
     HeyzapAds.InitReceiver();
     HZInterstitialAd.InitReceiver();
     HZVideoAd.InitReceiver();
     HZIncentivizedAd.InitReceiver();
     HZBannerAd.InitReceiver();
 }
Beispiel #7
0
 public static void InitReceiver()
 {
     if (_instance == null)
     {
         GameObject receiverObject = new GameObject("HZInterstitialAd");
         DontDestroyOnLoad(receiverObject);
         _instance = receiverObject.AddComponent <HZInterstitialAd>();
     }
 }
Beispiel #8
0
        /// <summary>
        /// Starts the Heyzap SDK. Call this method as soon as possible in your app to ensure Heyzap has time to initialize before you want to show an ad.
        /// </summary>
        /// <param name="publisher_id">Your publisher ID. This can be found on your Heyzap dashboards - see https://developers.heyzap.com/docs/unity_sdk_setup_and_requirements for more information.</param>
        /// <param name="options">A bitmask of options you can pass to this call to change the way Heyzap will work.</param>
        public static void Start(string publisher_id, int options)
        {
            #if !UNITY_EDITOR
            #if UNITY_ANDROID
            HeyzapAdsAndroid.Start(publisher_id, options);
            #endif

            #if UNITY_IPHONE
            HeyzapAdsIOS.Start(publisher_id, options);
            #endif

            HeyzapAds.InitReceiver();
            HZInterstitialAd.InitReceiver();
            HZIncentivizedAd.InitReceiver();
            HZBannerAd.InitReceiver();
            #endif
        }
        /// <summary>
        /// Starts the Heyzap SDK. Call this method as soon as possible in your app to ensure Heyzap has time to initialize before you want to show an ad.
        /// </summary>
        /// <param name="publisher_id">Your publisher ID. This can be found on your Heyzap dashboards - see https://developers.heyzap.com/docs/unity_sdk_setup_and_requirements for more information.</param>
        /// <param name="options">A bitmask of options you can pass to this call to change the way Heyzap will work.</param>
        public static void Start(string publisher_id, int options)
        {
            #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IPHONE)
                #if UNITY_ANDROID
            HeyzapAdsAndroid.Start(publisher_id, options);
                #elif UNITY_IPHONE
            HeyzapAdsIOS.Start(publisher_id, options);
                #endif
            #else
            UnityEngine.Debug.LogError("Call received to start the Heyzap SDK, but the SDK does not function in the editor. You must use a device/emulator to receive/test ads.");
            #endif

            HeyzapAds.InitReceiver();
            HZInterstitialAd.InitReceiver();
            HZVideoAd.InitReceiver();
            HZIncentivizedAd.InitReceiver();
            HZBannerAd.InitReceiver();
            HZDemographics.InitReceiver();
        }
Beispiel #10
0
 //provided since JS can't use default parameters
 /// <summary>
 /// Returns whether or not an ad is available for the default ad tag.
 /// </summary>
 /// <returns><c>true</c>, if an ad is available, <c>false</c> otherwise.</returns>
 public static bool IsAvailable()
 {
     return(HZInterstitialAd.IsAvailable(null));
 }
Beispiel #11
0
 public static void InitReceiver(){
     if (_instance == null) {
         GameObject receiverObject = new GameObject("HZInterstitialAd");
         DontDestroyOnLoad(receiverObject);
         _instance = receiverObject.AddComponent<HZInterstitialAd>();
     }
 }
Beispiel #12
0
 public static void chartboostShowForLocation(string location)
 {
     HZInterstitialAd.ChartboostShowForLocation(location);
 }
Beispiel #13
0
 //provided since JS can't use default parameters
 /// <summary>
 /// Shows an ad with the default options.
 /// </summary>
 public static void Show()
 {
     HZInterstitialAd.ShowWithOptions(null);
 }
Beispiel #14
0
 public static void show()
 {
     HZInterstitialAd.Show();
 }
Beispiel #15
0
 public static void fetch(string tag)
 {
     HZInterstitialAd.Fetch(tag);
 }
Beispiel #16
0
 public static void fetch()
 {
     HZInterstitialAd.Fetch();
 }
Beispiel #17
0
 public void SetCallback(string message)
 {
     string[] displayStateParams = message.Split(',');
     HZInterstitialAd.SetCallbackStateAndTag(displayStateParams[0], displayStateParams[1]);
 }
Beispiel #18
0
 public static bool isAvailable(string tag)
 {
     return(HZInterstitialAd.IsAvailable(tag));
 }
Beispiel #19
0
        protected static IEnumerator InvokeCallbackNextFrame(string state, string tag)
        {
            yield return(null); // wait a frame

            HZInterstitialAd.SetCallbackStateAndTag(state, tag);
        }
Beispiel #20
0
 public static void setDisplayListener(AdDisplayListener listener)
 {
     HZInterstitialAd.SetDisplayListener(listener);
 }
Beispiel #21
0
 //provided since JS can't use default parameters
 /// <summary>
 /// Fetches an ad for the default ad tag.
 /// </summary>
 public static void Fetch()
 {
     HZInterstitialAd.Fetch(null);
 }
Beispiel #22
0
 public static bool chartboostIsAvailableForLocation(string location)
 {
     return(HZInterstitialAd.ChartboostIsAvailableForLocation(location));
 }