void purchaseSuccessfulEvent(StoreKitTransaction transaction) { if (transaction.productIdentifier == Constants.PRODUCT_ID) { HZBannerAd.hide(); Main.Instance.isNoAdsPurchased = true; PlayerPrefs.SetBool(Constants.KEY_NOADS, Main.Instance.isNoAdsPurchased); PlayerPrefs.Flush(); if (Main.Instance.isNoAdsPurchased) { if (noAddButtonHome != null) { noAddButtonHome.interactable = false; } } if (Main.Instance.isNoAdsPurchased) { if (noAddButtonGameOver != null) { noAddButtonGameOver.interactable = false; } } } }
public void ShowIapPanel() { Main.Instance.PlayButtonClickSound(); if (gameOverPanel.gameObject.activeSelf) { if (!Main.Instance.isNoAdsPurchased) { HZBannerAd.hide(); } } isRestoring = false; inAppPanel.gameObject.SetActive(true); }
public void StoreClicked() { Main.Instance.PlayButtonClickSound(); if (GameData.isComingFromGameOverStore) { HZBannerAd.hide(); if (BackGroundManager.Instance != null) { BackGroundManager.Instance.transform.position = Vector3.zero; } } Application.LoadLevel(2); }