private void RewardHandler(object sender, GoogleMobileAds.Api.Reward e) { PlayerStats.instance.AddLevelInstaCoins(GameControllerScr.numMap); AdsController.instance._video.OnUserEarnedReward -= RewardHandler; _doubleCoinsObject.SetActive(true); _doubleCoinsButton.SetActive(false); }
private void OnUserEarnedRewardHandler(object sender, gmd.Reward e) { if (null != OnEarnedReward) { OnEarnedReward(this, new AdRewardEventArgs(e.Type, (int)e.Amount)); } }
private void SuccessfulWatchedvideo(object sender, GoogleMobileAds.Api.Reward e) { GameControllerScr.instance.ui._refresh(false); #if UNITY_ANDROID AdsController.instance._video.OnUserEarnedReward -= SuccessfulWatchedvideo; #endif CanvasControllerClose(); }
void HandleRewardBasedVideoRewarded(object sender, GoogleMobileAds.Api.Reward args) { reward.amount = args.Amount; reward.type = args.Type; OnRewardedReward?.Invoke(); string type = args.Type; double amount = args.Amount; Debug.Log("HandleRewardBasedVideoRewarded event received for " + amount.ToString() + " " + type); }
private void OnRewardAdWatchedHandle(GoogleMobileAds.Api.Reward reward) { //ad is watched uiCoinsText.text = (int.Parse(uiCoinsText.text) + rewardAmount).ToString(); //use admob reward amount: //uiCoinsText.text = (int.Parse (uiCoinsText.text) + reward.Amount).ToString () ; //enable the button: uiWatchAdButton.interactable = true; uiWatchAdText.text = defaultWatchAdButtonText; }
private static void RewardBasedVideoAdDidRewardUserCallback( IntPtr rewardBasedVideoAdClient, string rewardType, double rewardAmount) { Reward args = new Reward() { Type = rewardType, Amount = rewardAmount }; RewardBasedVideoAdClient client = IntPtrToRewardBasedVideoClient( rewardBasedVideoAdClient); client.OnAdRewarded(client, args); }
private void HandleRewardBasedVideoRewarded(object sender, Reward e) { Debug.Log("Reward : VideoRewarded"); App.GetNotificationCenter().Notify(Notification.AdRewarded); }
void onAdRewarded(string type, float amount) { Reward args = new Reward() { Type = type, Amount = amount }; OnAdRewarded(this, args); }