public void resetReward() { Debug.Log("resetReward"); this.rewardComplete = null; this.rewardAd.OnAdClosed -= this.onCloseReward; this.rewardAd.OnAdRewarded -= this.onCompleteReward; this.rewardAd.OnAdLeavingApplication -= this.onClickReward; this.reward = null; this.loadReward(); }
public void showReward(RewardCallback onComplete) { if (!this.isRewardLoaded()) { if (onComplete != null) { onComplete(0); } return; } Debug.Log("showReward"); this.sendAppEvent("ca_ad_rv_initiated"); this.sendAppEvent("ca_ad_rv_impression"); this.rewardComplete = onComplete; this.rewardAd.OnAdClosed += this.onCloseReward; this.rewardAd.OnAdRewarded += this.onCompleteReward; this.rewardAd.OnAdLeavingApplication += this.onClickReward; this.rewardAd.Show(); this.reward = null; }
/// <summary> /// Sets a reward handler for any API call results that return rewards. /// </summary> /// <param name="cb">The reward callback handler.</param> /// <see cref="http://getbraincloud.com/apidocs">The brainCloud API docs site for more information on the return JSON</see> public void RegisterRewardCallback(RewardCallback cb) { _comms.RegisterRewardCallback(cb); }
/// <summary> /// Sets a reward handler for any api call results that return rewards. /// </summary> /// <param name="in_cb">The reward callback handler.</param> /// <see cref="http://getbraincloud.com/apidocs">The brainCloud apidocs site for more information on the return JSON</see> public void RegisterRewardCallback(RewardCallback in_cb) { m_bc.RegisterRewardCallback(in_cb); }
public static void ShowReward(RewardCallback onComplete = null) { Instance.showReward(onComplete); }
public void DeregisterRewardCallback() { m_rewardCallback = null; }
public void RegisterRewardCallback(RewardCallback in_cb) { m_rewardCallback = in_cb; }