예제 #1
0
 public void onRewardedVideoAdRewarded(string description)
 {
     if (_onRewardedVideoAdRewardedEvent != null)
     {
         IronSourcePlacement ssp = getPlacementFromObject(description);
         _onRewardedVideoAdRewardedEvent(ssp);
     }
 }
예제 #2
0
        private void OnRewardedVideoAdRewarded(IronSourcePlacement placement)
        {
            if (placement == null)
            {
                return;
            }

            mRewardedVideoIsCompleted = true;
        }
예제 #3
0
    private void RewardedVideoAdClickedEvent(IronSourcePlacement obj)
    {
        var rewardAmount = PlayerPrefs.GetInt(PlayerPrefKeys.RewardAmount, 0);

        rewardAmount += obj.getRewardAmount();

        AnalitycsManager.Instance.LogEvent("Ad_Event", "RewardedVideoClicked", "Reward amount_" + rewardAmount);
        PlayerPrefs.SetInt(PlayerPrefKeys.RewardAmount, rewardAmount);
    }
 //Invoked when the user completed the video and should be rewarded.
 //If using server-to-server callbacks you may ignore this events and wait for the callback from the  ironSource server.
 //
 //@param - placement - placement object which contains the reward data
 //
 void RewardedVideoAdRewardedEvent(IronSourcePlacement placement)
 {
     if (debug)
     {
         Debug.Log(this + " RewardedVideoAdRewardedEvent " + placement);
         ScreenWriter.Write(this + " RewardedVideoAdRewardedEvent " + placement);
     }
     rewardedWatched = true;
 }
    void onRewardedVideoAdClicked(string description)
    {
        if (this.OnRewardedVideoAdClicked != null)
        {
            IronSourcePlacement ssp = IronSourceUtils.getPlacementFromObject(description);

            this.OnRewardedVideoAdClicked(ssp);
        }
    }
예제 #6
0
 public void onRewardedVideoAdClickedDemandOnly(string args)
 {
     if (_onRewardedVideoAdClickedDemandOnlyEvent != null && !String.IsNullOrEmpty(args))
     {
         List <object>       argList    = IronSourceJSON.Json.Deserialize(args) as List <object>;
         string              instanceId = argList[0].ToString();
         IronSourcePlacement ssp        = getPlacementFromObject(argList[1]);
         _onRewardedVideoAdClickedDemandOnlyEvent(instanceId, ssp);
     }
 }
 public void onRewardedVideoAdClickedDemandOnly(string args)
 {
     if (IronSourceEvents._onRewardedVideoAdClickedDemandOnlyEvent != null && !string.IsNullOrEmpty(args))
     {
         List <object>       list = Json.Deserialize(args) as List <object>;
         string              arg  = list[0].ToString();
         IronSourcePlacement placementFromObject = getPlacementFromObject(list[1]);
         IronSourceEvents._onRewardedVideoAdClickedDemandOnlyEvent(arg, placementFromObject);
     }
 }
예제 #8
0
    //Invoked when the user completed the video and should be rewarded.
    //If using server-to-server callbacks you may ignore this events and wait for
    // the callback from the  ironSource server.
    //@param - placement - placement object which contains the reward data
    void RewardedVideoAdRewardedEvent(IronSourcePlacement placement)
    {
        var rewardAmount = PlayerPrefs.GetInt(PlayerPrefKeys.RewardAmount, 0);

        rewardAmount += placement.getRewardAmount();
        AnalitycsManager.Instance.LogEvent("Ad_Event", "RewardedVideoSuccess", rewardAmount.ToString());
        OnRewardRewardedEvent.Invoke();
        OnRewardRewardedEvent.RemoveAllListeners();
        PlayerPrefs.SetInt(PlayerPrefKeys.RewardAmount, rewardAmount);
    }
예제 #9
0
        //Invoked when the user completed the video and should be rewarded.
        //If using server-to-server callbacks you may ignore this events and wait for the callback from the  ironSource server.
        //
        //@param - placement - placement object which contains the reward data
        //
        void RewardedVideoAdRewardedEvent(IronSourcePlacement placement)
        {
            onAdEventInfo(new AdEventInfo()
            {
                adType = AdType.RewardedAd, eventType = AdEventType.REWARDED_AD_REWARDED
            });
            var callbackData = new RewardedAdResultData(mCurrentPlacementName, true);

            doRewardedAdResultCallback(callbackData);
        }
예제 #10
0
    public IronSourcePlacement getPlacementFromString(string jsonPlacement)
    {
        Dictionary <string, object> placementJSON = IronSourceJSON.Json.Deserialize(jsonPlacement) as Dictionary <string, object>;
        IronSourcePlacement         ssp;
        int    rewardAmount  = Convert.ToInt32(placementJSON ["placement_reward_amount"].ToString());
        string rewardName    = placementJSON ["placement_reward_name"].ToString();
        string placementName = placementJSON ["placement_name"].ToString();

        ssp = new IronSourcePlacement(placementName, rewardName, rewardAmount);
        return(ssp);
    }
예제 #11
0
    void RewardedVideoAdRewardedEvent(IronSourcePlacement ssp)
    {
        Debug.Log("I got RewardedVideoAdRewardedEvent, amount = " + ssp.getRewardAmount() + " name = " + ssp.getRewardName());
        //userTotalCredits = userTotalCredits + ssp.getRewardAmount();
        //GameHelper.player.ChangeCoins(ssp.getRewardAmount());
        GameHelper.IsShowRewardedVideoCoins = true;
        IsShowInterstitalWhenBack           = false;

        GameHelper.RewardedVideoCoin = ssp.getRewardAmount();
        //AmountText.GetComponent<UnityEngine.UI.Text>().text = "" + userTotalCredits;
    }
예제 #12
0
 //Invoked when the user completed the video and should be rewarded.
 //If using server-to-server callbacks you may ignore this events and wait for the callback from the  ironSource server.
 //
 //@param - placement - placement object which contains the reward data
 //
 void RewardedVideoAdRewardedEvent(IronSourcePlacement placement)
 {
     Debug.Log("SDK:IronSourceSDK >>>> RewardedVideoAdRewardedEvent placement:" + placement.ToString());
     //Placement can return null if the placementName is not valid.
     if (placement != null)
     {
         String placementName = placement.getPlacementName();
         String rewardName    = placement.getRewardName();
         int    rewardAmount  = placement.getRewardAmount();
         this.InvokeRewardedVideoHandlerAndClean(ADResult.RewardedVideoResult.REWARDED);
     }
 }
예제 #13
0
 private void RewardedVideoAdRewardedEvent(IronSourcePlacement placement)
 {
     if (isDebugging)
     {
         Debug.Log("[ironSourceEvent] Rewarded ad. Rewarded event");
     }
     if (currentAd != null && currentAd.Callbacks.OnRewardPending != null)
     {
         currentAd.Callbacks.OnRewardPending(placement.getRewardName(), placement.getRewardAmount());
         currentAd.Dispose();
         currentAd = null;
     }
 }
예제 #14
0
    public IronSourcePlacement getPlacementInfo(string placementName)
    {
        string placementInfo      = getBridge().Call <string> ("getPlacementInfo", placementName);
        IronSourcePlacement pInfo = null;

        if (placementInfo != null)
        {
            Dictionary <string, object> pInfoDic = IronSourceJSON.Json.Deserialize(placementInfo) as Dictionary <string, object>;
            string pName   = pInfoDic [PLACEMENT_NAME].ToString();
            string rName   = pInfoDic [REWARD_NAME].ToString();
            int    rAmount = Convert.ToInt32(pInfoDic [REWARD_AMOUNT].ToString());

            pInfo = new IronSourcePlacement(pName, rName, rAmount);
        }
        return(pInfo);
    }
예제 #15
0
    //Invoked when the user completed the video and should be rewarded.
    //If using server-to-server callbacks you may ignore this events and wait for
    //the callback from the ironSource server.
    //@param - placement - placement object which contains the reward data
    void RewardedVideoAdRewardedEvent(IronSourcePlacement placement)
    {
        /*Debug.Log("Finished video:" + finished);
         * if (finished)*/

        //Reward Player Function
        doRewardUser();

#if UNITY_IOS
        Time.timeScale = 1;
#endif
        if (OnRewardedNeeded != null)
        {
            OnRewardedNeeded();
        }
    }
예제 #16
0
    public IronSourcePlacement getPlacementInfo(string placementName)
    {
        IronSourcePlacement sp = null;

        string spString = CFGetPlacementInfo(placementName);

        if (spString != null)
        {
            Dictionary <string, object> spDic = IronSourceJSON.Json.Deserialize(spString) as Dictionary <string, object>;
            string pName        = spDic ["placement_name"].ToString();
            string rewardName   = spDic ["reward_name"].ToString();
            int    rewardAmount = Convert.ToInt32(spDic ["reward_amount"].ToString());
            sp = new IronSourcePlacement(pName, rewardName, rewardAmount);
        }

        return(sp);
    }
예제 #17
0
 void RewardedVideoAdRewardedEvent(IronSourcePlacement ssp)
 {
     EzDebug.Log("unity-script: I got RewardedVideoAdRewardedEvent, amount = " + ssp.getRewardAmount() + " name = " + ssp.getRewardName());
     if (ssp.getRewardAmount() > 0 && !string.IsNullOrEmpty(ssp.getRewardName()))
     {
         if (_onRewardAds != null)
         {
             _onRewardAds((int)Type.ADS_RESULT_FINISHT);
         }
     }
     else
     {
         if (_onRewardAds != null)
         {
             _onRewardAds((int)Type.ADS_RESULT_SKIP);
         }
     }
 }
    private IronSourcePlacement getPlacementFromObject(object placementObject)
    {
        Dictionary <string, object> dictionary = null;

        if (placementObject is IDictionary)
        {
            dictionary = (placementObject as Dictionary <string, object>);
        }
        else if (placementObject is string)
        {
            dictionary = (Json.Deserialize(placementObject.ToString()) as Dictionary <string, object>);
        }
        IronSourcePlacement result = null;

        if (dictionary != null && dictionary.Count > 0)
        {
            int    rewardAmount  = Convert.ToInt32(dictionary["placement_reward_amount"].ToString());
            string rewardName    = dictionary["placement_reward_name"].ToString();
            string placementName = dictionary["placement_name"].ToString();
            result = new IronSourcePlacement(placementName, rewardName, rewardAmount);
        }
        return(result);
    }
예제 #19
0
 void RewardedVideoAdRewardedEvent(IronSourcePlacement ssp)
 {
     Debug.Log("unity-script: I got RewardedVideoAdRewardedEvent, amount = " + ssp.getRewardAmount() + " name = " + ssp.getRewardName());
 }
예제 #20
0
 private void OnRewardedVideoAdClicked(IronSourcePlacement obj)
 {
 }
예제 #21
0
 private void RewardedVideoAdClickedEvent(IronSourcePlacement obj)
 {
 }
예제 #22
0
 private void RewardedVideoAdRewardedEvent(IronSourcePlacement obj)
 {
     GameManager.Instance.SendAdjustPlayAdEvent(true, true, adM.adDes);
     Ads._instance.GetReward();
 }
예제 #23
0
 // Вызывается, когда пользователь завершил видео и должен быть вознагражден.
 // При использовании обратных вызовов от сервера к серверу вы можете игнорировать эти события и ждать обратного вызова с сервера ironSource.
 //@param - placement - объект размещения, который содержит данные вознаграждения
 //
 void RewardedVideoAdRewardedEvent(IronSourcePlacement placement)
 {
     OnRewardedOk?.Invoke();
 }
예제 #24
0
 private void RewardedVideoAdRewardedEvent(IronSourcePlacement obj)
 {
     Tracking.Instance.Track("stencil_ad_reward");
     NotifyComplete(true);
 }
예제 #25
0
 protected void OnRewardedVideoAdRewardedEvent(IronSourcePlacement placement)
 {
     HandleOnAdRewarded();
 }
예제 #26
0

        
예제 #27
0
 private void RewardedVideoAdClickEvent(IronSourcePlacement obj)
 {
     Tracking.Instance.Track("stencil_ad_click", "type", "rewarded");
 }
 private void OnAdsCompleted(IronSourcePlacement placement)
 {
     OnAdsCompleted();
 }
예제 #29
0
 void RewardedVideoAdClickedEvent(IronSourcePlacement ssp)
 {
     Debug.Log("I got RewardedVideoAdClickedEvent, name = " + ssp.getRewardName());
 }
 void RewardedVideoAdRewardedEvent(IronSourcePlacement ssp)
 {
     Debug.Log("unity-script: I got RewardedVideoAdRewardedEvent, amount = " + ssp.getRewardAmount() + " name = " + ssp.getRewardName());
     userTotalCredits = userTotalCredits + ssp.getRewardAmount();
     AmountText.GetComponent <UnityEngine.UI.Text> ().text = "" + userTotalCredits;
 }