public void onRewardedVideoAdRewarded(string description) { if (_onRewardedVideoAdRewardedEvent != null) { IronSourcePlacement ssp = getPlacementFromObject(description); _onRewardedVideoAdRewardedEvent(ssp); } }
private void OnRewardedVideoAdRewarded(IronSourcePlacement placement) { if (placement == null) { return; } mRewardedVideoIsCompleted = true; }
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); } }
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); } }
//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); }
//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); }
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); }
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; }
//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); } }
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; } }
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); }
//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(); } }
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); }
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); }
void RewardedVideoAdRewardedEvent(IronSourcePlacement ssp) { Debug.Log("unity-script: I got RewardedVideoAdRewardedEvent, amount = " + ssp.getRewardAmount() + " name = " + ssp.getRewardName()); }
private void OnRewardedVideoAdClicked(IronSourcePlacement obj) { }
private void RewardedVideoAdClickedEvent(IronSourcePlacement obj) { }
private void RewardedVideoAdRewardedEvent(IronSourcePlacement obj) { GameManager.Instance.SendAdjustPlayAdEvent(true, true, adM.adDes); Ads._instance.GetReward(); }
// Вызывается, когда пользователь завершил видео и должен быть вознагражден. // При использовании обратных вызовов от сервера к серверу вы можете игнорировать эти события и ждать обратного вызова с сервера ironSource. //@param - placement - объект размещения, который содержит данные вознаграждения // void RewardedVideoAdRewardedEvent(IronSourcePlacement placement) { OnRewardedOk?.Invoke(); }
private void RewardedVideoAdRewardedEvent(IronSourcePlacement obj) { Tracking.Instance.Track("stencil_ad_reward"); NotifyComplete(true); }
protected void OnRewardedVideoAdRewardedEvent(IronSourcePlacement placement) { HandleOnAdRewarded(); }
private void RewardedVideoAdClickEvent(IronSourcePlacement obj) { Tracking.Instance.Track("stencil_ad_click", "type", "rewarded"); }
private void OnAdsCompleted(IronSourcePlacement placement) { OnAdsCompleted(); }
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; }