using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Advertisements;
using UnityEngine.UI;
public class UnityAds : MonoBehaviour, IUnityAdsListener
{
string placement = "rewardedVideo";
public Text moneyTxt;
void Start()
{
Advertisement.AddListener(this);
Advertisement.Initialize("------", true);
}
public void OnUnityAdsDidFinish(string placementId, ShowResult showResult)
{
if (showResult == ShowResult.Finished)
{
moneyTxt.text = "<size=40><color=#D79242>Money:" ;
}
else if (showResult == ShowResult.Failed)
{
//On no!
}
}
public void OnUnityAdsDidStart(string placementId)
{
}
public void OnUnityAdsReady(string placementId)
{
}
public void OnUnityAdsDidError(string message)
{
}
void UnityAdd()
{
Advertisement.Initialize("4037106", true);
}
public void ShowUnityAD(string p)
{
Advertisement.Show(p);
}
}