Example #1
0
    public void showVideoAd()
    {
        if (HZIncentivizedAd.isAvailable())
        {
            HZIncentivizedAd.show();

            HZIncentivizedAd.setDisplayListener(listener);
        }
    }
Example #2
0
    // 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);
        }
    }