예제 #1
0
 internal MoPubUnityEditorAdUnit(string adUnitId, string adType = null)
 {
     AdUnitId       = adUnitId;
     SelectedReward = new MoPub.Reward {
         Label = string.Empty
     };
 }
 internal override void SelectReward(MoPub.Reward selectedReward)
 {
     if (CheckAdUnitRequested())
     {
         SelectedReward = selectedReward;
     }
 }
예제 #3
0
 public MoPubBinding(string adUnitId)
 {
     _adUnitId      = adUnitId;
     SelectedReward = new MoPub.Reward {
         Label = string.Empty
     };
 }
예제 #4
0
 protected MoPubAdUnit(string adUnitId, string adType = null)
 {
     AdUnitId       = adUnitId;
     AdType         = adType;
     SelectedReward = new MoPub.Reward {
         Label = string.Empty
     };
 }
예제 #5
0
    internal override void SelectReward(MoPub.Reward selectedReward)
    {
        if (!CheckPluginReady())
        {
            return;
        }

        SelectedReward = selectedReward;
    }
    internal MoPubAndroidAdUnit(string adUnitId, string adType = null)
    {
        if (adType != "Banner" && adType != "Interstitial" && adType != "RewardedVideo" && adType != "Native")
        {
            Debug.LogErrorFormat("FATAL ERROR: Invalid ad type for Android Plugin: \"{0}\"", adType);
        }

        _plugin        = new AndroidJavaObject("com.mopub.unity.MoPub" + adType + "UnityPlugin", adUnitId);
        AdUnitId       = adUnitId;
        SelectedReward = new MoPub.Reward {
            Label = string.Empty
        };
    }
    internal override void SelectReward(MoPub.Reward selectedReward)
    {
        AndroidJavaObject rewardJavaObj;

        if (_rewardsDict.TryGetValue(selectedReward, out rewardJavaObj))
        {
            _plugin.Call("selectReward", rewardJavaObj);
        }
        else
        {
            Debug.LogWarning(string.Format("Selected reward {0} is not available.", selectedReward));
        }
    }
예제 #8
0
 internal override void SelectReward(MoPub.Reward selectedReward)
 {
     SelectedReward = selectedReward;
 }
예제 #9
0
 internal abstract void SelectReward(MoPub.Reward selectedReward);
예제 #10
0
 internal virtual void SelectReward(MoPub.Reward selectedReward)
 {
 }