void Start()
 {
     Instanse = this;
     // Initialize the Ads listener and service:
     Advertisement.AddListener(this);
     Advertisement.Initialize(gameId, true);
 }
    void Awake()
    {
        _rewardedAds = this;

        // Initialize the Ads listener and service:
        Advertisement.AddListener(this);
        Advertisement.Initialize(gameId, testMode);
        IsAdReady();
    }
Example #3
0
    public void RequestPowerUpActivation()
    {
        LoadPriceOfPowerUpFromPref();
        bool purchaseStatus;

        if (_adSupport)
        {
            adAvailable = false;
            currentRewardedVideoRequestedPowerUp = this;
            RewardedAdsManager.ShowRewardedVideo();
            return;
        }

        purchaseStatus = CashManager.MakePurchase(powerUpCost);

        if (purchaseStatus)
        {
            ActivatePowerUp();
        }
    }