public void ShowBannerAd() { HZBannerShowOptions showOptions = new HZBannerShowOptions(); showOptions.Position = HZBannerShowOptions.POSITION_TOP; HZBannerAd.ShowWithOptions(showOptions); }
/// <summary> /// Show Heyzap banner /// </summary> /// <param name="position"> can be TOP of BOTTOM</param> /// <param name="bannerType"> it is not used in Heyzap, this param is used just in Admob implementation</param> public void ShowBanner(BannerPosition position, BannerType bannerType, UnityAction <bool, BannerPosition, BannerType> DisplayResult) { bannerUsed = true; this.position = position; this.bannerType = bannerType; this.DisplayResult = DisplayResult; if (IsBannerAvailable()) { HZBannerShowOptions showOptions = new HZBannerShowOptions(); if (position == BannerPosition.TOP) { showOptions.Position = HZBannerShowOptions.POSITION_TOP; } else if (position == BannerPosition.BOTTOM) { showOptions.Position = HZBannerShowOptions.POSITION_BOTTOM; } if (debug) { Debug.Log(this + " Show Banner"); ScreenWriter.Write(this + " Show Banner"); } HZBannerAd.ShowWithOptions(showOptions); } }
private void ShowBanner() { HZBannerShowOptions showOptions = new HZBannerShowOptions(); showOptions.Position = HZBannerShowOptions.POSITION_BOTTOM; HZBannerAd.ShowWithOptions(showOptions); }
// Use this for initialization void Start() { HeyzapAds.Start("9a5b94190642abf2b815c547052624d3", HeyzapAds.FLAG_NO_OPTIONS); HZBannerShowOptions showOptions = new HZBannerShowOptions(); showOptions.Position = HZBannerShowOptions.POSITION_TOP; HZBannerAd.ShowWithOptions(showOptions); }
void ShowAdBanner() { HZBannerShowOptions showOptions = new HZBannerShowOptions(); showOptions.Position = HZBannerShowOptions.POSITION_BOTTOM; showOptions.SelectedAdMobSize = HZBannerShowOptions.AdMobSize.SMART_BANNER; showOptions.Tag = "Banner"; HZBannerAd.ShowWithOptions(showOptions); }
//------------------------------------------------------------ // Banner Ads. //------------------------------------------------------------ public void ShowBannerAd(BannerAdPosition position, BannerAdSize size) { #if EM_HEYZAP HZBannerShowOptions showOptions = new HZBannerShowOptions(); showOptions.Position = position.ToHeyzapAdPosition(); HZBannerAd.ShowWithOptions(showOptions); #else Debug.LogError(NO_SDK_MESSAGE); #endif }
//------------------------------------------------------------ // Banner Ads. //------------------------------------------------------------ protected override void InternalShowBannerAd(AdPlacement placement, BannerAdPosition position, BannerAdSize __) { #if EM_HEYZAP HZBannerShowOptions showOptions = new HZBannerShowOptions { Position = ToHeyzapAdPosition(position), Tag = ToHeyzapAdTag(placement) }; HZBannerAd.ShowWithOptions(showOptions); #endif }
public void ShowBannerAd(string _position) { if (adsRemoved) { Toaster.ShowDebugToast("Not showing banner ad because ads are removed"); return; } HZBannerShowOptions showOptions = new HZBannerShowOptions(); showOptions.Position = _position; HZBannerAd.ShowWithOptions(showOptions); Toaster.ShowDebugToast("Showing banner ad"); }
public void ToggleBanner() { if (!bannerShowing) { HZBannerShowOptions showOptions = new HZBannerShowOptions(); showOptions.Position = HZBannerShowOptions.POSITION_BOTTOM; HZBannerAd.ShowWithOptions(showOptions); bannerShowing = true; } else { HZBannerAd.Hide(); HZBannerAd.Destroy(); bannerShowing = false; } }
public void OnGameRulesOkClicked() { if (GameData.Instance.isMusicON != 0) { SoundManager.instance.PlaySingle(menuClip); } if (GameData.Instance.noAd != 99) { HZBannerShowOptions showOptions = new HZBannerShowOptions(); showOptions.Position = HZBannerShowOptions.POSITION_BOTTOM; HZBannerAd.ShowWithOptions(showOptions); } rulesObject.SetActive(false); }
public void ShowButton() { string tag = this.adTag(); HZShowOptions showOptions = new HZShowOptions(); showOptions.Tag = tag; HZIncentivizedShowOptions incentivizedOptions = new HZIncentivizedShowOptions(); incentivizedOptions.Tag = tag; incentivizedOptions.IncentivizedInfo = "test app incentivized info!"; HZBannerShowOptions bannerOptions = new HZBannerShowOptions(); bannerOptions.Tag = tag; bannerOptions.Position = this.bannerPosition; HZOfferWallShowOptions offerwallOptions = new HZOfferWallShowOptions(); offerwallOptions.ShouldCloseAfterFirstClick = offerwallCloseOnFirstClickToggle.isOn; offerwallOptions.Tag = tag; this.console.Append("Showing " + this.SelectedAdType.ToString() + " with tag: " + tag); switch (this.SelectedAdType) { case AdType.Interstitial: HZInterstitialAd.ShowWithOptions(showOptions); break; case AdType.Video: HZVideoAd.ShowWithOptions(showOptions); break; case AdType.Incentivized: HZIncentivizedAd.ShowWithOptions(incentivizedOptions); break; case AdType.Banner: HZBannerAd.ShowWithOptions(bannerOptions); break; case AdType.Offerwall: HZOfferWallAd.ShowWithOptions(offerwallOptions); break; } }
public void PlayerBackClicked() { if (GameData.Instance.isMusicON != 0) { SoundManager.instance.PlaySingle(menuClip); } Debug.Log("Back button Clicked"); if (GameData.Instance.noAd != 99) { HZBannerShowOptions showOptions = new HZBannerShowOptions(); showOptions.Position = HZBannerShowOptions.POSITION_BOTTOM; HZBannerAd.ShowWithOptions(showOptions); } playersObject.SetActive(false); }
public override void Init() { if (!AdsController.NoAds) { HeyzapAds.Start(apiKey, HeyzapAds.FLAG_DISABLE_AUTOMATIC_FETCHING); SetCallbacks(); if (showBanner) { HZBannerShowOptions showOptions = new HZBannerShowOptions(); showOptions.Position = HZBannerShowOptions.POSITION_BOTTOM; HZBannerAd.ShowWithOptions(showOptions); } for (int i = values.Count - 1; i >= 0; i--) { FetchAds(values[i]); } } }
// Use this for initialization void Start() { int themeIndex = 0; if (Main.Instance.totalGames % 3 == 0) { themeIndex = 0; } else { themeIndex = Main.Instance.totalGames % 3; } bgPanel.GetComponent <Image>().sprite = Resources.Load <Sprite> ("Textures/Theme/" + "BG_" + themeIndex) as Sprite; spinnerSprite.sprite = Resources.Load <Sprite> ("Textures/Theme/" + "PF_" + themeIndex) as Sprite; int bttnLength = characters.Length; distances = new float[bttnLength]; purchaseInfo = new bool[bttnLength]; // Get the distance betwwen buttons buttonDistance = (int)Mathf.Abs(characters[1].GetComponent <RectTransform>().anchoredPosition.x - characters[0].GetComponent <RectTransform>().anchoredPosition.x); totalStarText.text = "" + Main.Instance.starsCnt; needText.gameObject.SetActive(false); GetPurchaseStatus(); if (!Main.Instance.isNoads) { HZBannerShowOptions showOptions = new HZBannerShowOptions(); showOptions.Position = HZBannerShowOptions.POSITION_TOP; HZBannerAd.ShowWithOptions(showOptions); } Main.Instance.shopScrollPosX = PlayerPrefs.GetFloat("ScrolPos", 0); scrollContent.anchoredPosition = new Vector2(Main.Instance.shopScrollPosX, 0); }
public void ShowBanner(string tag) { if (_bannerDisplayed) { HideBanner(); } //Debug.Log("ShowBanner: " + tag); if (BannerDisplayed != null) { BannerDisplayed(); } #if API_ADS_HEYZAP HZBannerShowOptions options = new HZBannerShowOptions(); options.Tag = tag; options.Position = HZBannerShowOptions.POSITION_TOP; HZBannerAd.ShowWithOptions(options); #endif _bannerDisplayed = true; }
void OnLevelWasLoaded(int level) { switch (level) { case 0: break; case 1: HZBannerShowOptions showOptions1 = new HZBannerShowOptions(); showOptions1.Position = HZBannerShowOptions.POSITION_BOTTOM; HZBannerAd.ShowWithOptions(showOptions1); break; case 2: HZBannerShowOptions showOptions = new HZBannerShowOptions(); showOptions.Position = HZBannerShowOptions.POSITION_BOTTOM; HZBannerAd.ShowWithOptions(showOptions); break; case 3: break; } }
// Use this for initialization void Start() { if (GameData.isComingFromStore && !GameData.isComingFromGameOverStore) { //On Main menu // Debug.Log("Create 2"); BackGroundManager.Instance.SpwanBird(); } canRestored = false; if (!logoPanel.gameObject.activeSelf) // && !GameData.isTutorial) { logoPanel.gameObject.SetActive(true); } if (tutorialPanel.gameObject.activeSelf) { tutorialPanel.gameObject.SetActive(false); } if (tutorialReplay.gameObject.activeSelf) { tutorialReplay.gameObject.SetActive(false); } hintText.gameObject.SetActive(false); hintText2.gameObject.SetActive(false); if (homePanel.gameObject.activeSelf) { homePanel.gameObject.SetActive(false); } if (instructionPanel.gameObject.activeSelf) { instructionPanel.gameObject.SetActive(false); } if (hudPanel.gameObject.activeSelf) { hudPanel.gameObject.SetActive(false); } if (gameOverPanel.gameObject.activeSelf) { gameOverPanel.gameObject.SetActive(false); } revivePanel.SetActive(false); inAppPanel.gameObject.SetActive(false); gameScore = 0; GameData.isMusic = PlayerPrefs.GetBool(Constants.KEY_MUSIC, true); GameData.reviveCount = PlayerPrefs.GetInt(Constants.KEY_REVIVE_CNT, 0); GameData.lifeTimeEggs = PlayerPrefs.GetInt(Constants.KEY_LIFE_TIME_EGGS, 0); GameData.unlockCount = PlayerPrefs.GetInt(Constants.KEY_UNLOCK_CNT, 0); // #if UNITY_IOS // // array of product ID's from iTunesConnect. MUST match exactly what you have there! // var productIdentifiers = new string[] {Constants.PRODUCT_ID}; // StoreKitBinding.requestProductData( productIdentifiers ); // // #elif UNITY_ANDROID // var skus = new string[] {Constants.PRODUCT_ID}; // GoogleIAB.queryInventory( skus ); // #endif PlayerPrefs.SetInt(Constants.KEY_TOTAL_EGGS, Main.Instance.totalEggs); GameData.isComingFromStore = false; GameData.isComingFromGameOverStore = false; HZIncentivizedAd.setDisplayListener(listener); HZIncentivizedAd.fetch(); #if UNITY_IOS AppTrackerIOS.startSession("FPxjfDrMNNVRJ0REcLqwHL45mG1HEnII"); #endif if (!Main.Instance.isNoAdsPurchased) { HZBannerShowOptions showOptions = new HZBannerShowOptions(); showOptions.Position = HZBannerShowOptions.POSITION_BOTTOM; HZBannerAd.ShowWithOptions(showOptions); } }