コード例 #1
0
ファイル: AdapterMopub.cs プロジェクト: Pasdedeux/LTool
 //加载失败
 private void OnRewardedVideoFailedEvent(string adUnitId, string error)
 {
     //MoPub.RequestRewardedVideo(_rewardedVideoAdUnits[0]);
     LDebug.Log("激励视频广告加载失败,id:" + adUnitId);
     LDebug.Log("激励视频广告加载失败,error:" + error);
     RewardShowEventHandler?.Invoke(false);
 }
コード例 #2
0
ファイル: AdapterMopub.cs プロジェクト: Pasdedeux/LTool
 //视频完整播放完回调
 private void OnRewardedVideoReceivedRewardEvent(string adUnitId, string label, float amount)
 {
     LDebug.Log("视频完整播放完回调,id:" + adUnitId);
     LDebug.Log("视频完整播放完回调,label:" + label);
     LDebug.Log("视频完整播放完回调,amount:" + amount);
     RewardShowEventHandler?.Invoke(true);
 }
コード例 #3
0
ファイル: AdapterMopub.cs プロジェクト: Pasdedeux/LTool
    public override void ShowRewarded()
    {
#if MOPUB
        if (IsRewardedVideoAvailable())
        {
            MoPub.ShowRewardedVideo(_rewardedVideoAdUnits[0]);
        }
        else if (RewardShowEventHandler != null)
        {
            RewardShowEventHandler(false);
        }
#else
        RewardShowEventHandler?.Invoke(false);
#endif
    }