Exemplo n.º 1
0
    public UniRx.IObservable <AdService.V2PShowResult> Show()
    {
        if (m_rewardBasedVideo.IsLoaded())
        {
            return(Observable.Create(delegate(UniRx.IObserver <AdService.V2PShowResult> subscriber)
            {
                m_adFinishedMain.Take(1).Subscribe(delegate(bool finished)
                {
                    subscriber.OnNext((!finished) ? AdService.V2PShowResult.Skipped : AdService.V2PShowResult.Finished);
                    subscriber.OnCompleted();
                });
                m_rewardBasedVideo.ShowRewardBasedVideoAd();
                return new BooleanDisposable();
            }));
        }

        adReady.Value = false;
        return(Observable.Return(AdService.V2PShowResult.Failed));
    }
Exemplo n.º 2
0
 // Shows the reward based video.
 public void Show()
 {
     client.ShowRewardBasedVideoAd();
 }