public void ShowInterstitial() { if (Yodo1U3dMas.IsInterstitialAdLoaded()) { Yodo1U3dMas.ShowInterstitialAd(); } }
void SetRewardDelegate() { Yodo1U3dMas.SetRewardedAdDelegate((Yodo1U3dAdEvent adEvent, Yodo1U3dAdError error) => { Debug.Log("[Yodo1 Mas] RewardVideoDelegate:" + adEvent.ToString() + "\n" + error.ToString()); switch (adEvent) { case Yodo1U3dAdEvent.AdClosed: Debug.Log("[Yodo1 Mas] Reward video ad has been closed."); break; case Yodo1U3dAdEvent.AdOpened: Debug.Log("[Yodo1 Mas] Reward video ad has shown successful."); break; case Yodo1U3dAdEvent.AdError: Debug.Log("[Yodo1 Mas] Reward video ad error, " + error); break; case Yodo1U3dAdEvent.AdReward: Debug.Log("[Yodo1 Mas] Reward video ad reward, give rewards to the player for fortune spin."); HandleUserEarnedReward(); break; } }); }
void SetDelegates() { Yodo1U3dMas.SetInitializeDelegate((bool success, Yodo1U3dAdError error) => { Debug.Log("[Yodo1 Mas] InitializeDelegate, success:" + success + ", error: \n" + error.ToString()); }); Yodo1U3dMas.SetInterstitialAdDelegate((Yodo1U3dAdEvent adEvent, Yodo1U3dAdError error) => { Debug.Log("[Yodo1 Mas] InterstitialAdDelegate:" + adEvent.ToString() + "\n" + error.ToString()); switch (adEvent) { case Yodo1U3dAdEvent.AdClosed: Debug.Log("[Yodo1 Mas] Interstital ad has been closed."); break; case Yodo1U3dAdEvent.AdOpened: Debug.Log("[Yodo1 Mas] Interstital ad has been shown."); break; case Yodo1U3dAdEvent.AdError: Debug.Log("[Yodo1 Mas] Interstital ad error, " + error.ToString()); break; } }); }
private void Start() { // Initialize MAS SDK // Check COPPA and avoid ask the user // every time the app boot if (PlayerPrefs.HasKey("COPPA")) { bool COPPACheck = PlayerPrefs.GetInt("COPPA", 0) == 1; if (COPPACheck) { Yodo1U3dMas.InitializeSdk(); Debug.Log("SDK initialized, COPPA AGREE"); ConsoleText.text = "SDK initialized, COPPA AGREE"; //Show the events in the Scene console Coinstext.text = "Coins: " + coins.ToString(); } else if (!COPPACheck) { Yodo1U3dMas.InitializeSdk(); Debug.Log("SDK initialized, COPPA NOT AGREE"); ConsoleText.text = "SDK initialized, COPPA NOT AGREE"; Coinstext.text = "Coins: " + coins.ToString(); } } }
public void RewardedVideoEvents() { Yodo1U3dMas.SetRewardedAdDelegate((Yodo1U3dAdEvent adEvent, Yodo1U3dAdError error) => { Debug.Log("[Yodo1 Mas] RewardVideoDelegate:" + adEvent.ToString() + "\n" + error.ToString()); switch (adEvent) { case Yodo1U3dAdEvent.AdClosed: Debug.Log("[Yodo1 Mas] Reward video ad has been closed."); break; case Yodo1U3dAdEvent.AdOpened: Debug.Log("[Yodo1 Mas] Reward video ad has shown successful."); break; case Yodo1U3dAdEvent.AdError: Debug.Log("[Yodo1 Mas] Reward video ad error, " + error); break; case Yodo1U3dAdEvent.AdReward: Debug.Log("[Yodo1 Mas] Reward video ad reward, give rewards to the player."); coins += 15; Coinstext.text = "Coins: " + coins.ToString(); ConsoleText.text = "Rewarded Video Showed with Succes \n Reward Received +15 Coins"; break; } }); }
public void CCPAYES() { //Set CCPA to YES PlayerPrefs.SetInt("CCPA", 1); Yodo1U3dMas.SetCCPA(true); Debug.Log("User Agree with CCPA"); Text ConsoleText = GetComponent <AdsManager>().ConsoleText; ConsoleText.text = "User Agree with CCPA"; }
public void CCPANO() { //Set CCPA to NO PlayerPrefs.SetInt("CCPA", 0); Yodo1U3dMas.SetCCPA(false); Debug.Log("User Not Agree with CCPA"); Text ConsoleText = GetComponent <AdsManager>().ConsoleText; ConsoleText.text = "User Not Agree with CCPA"; }
public void GDPRNO() { //Set GDPR to NO PlayerPrefs.SetInt("GDPR", 0); Yodo1U3dMas.SetGDPR(false); Debug.Log("User Not Agree with GDPR"); Text ConsoleText = GetComponent <AdsManager>().ConsoleText; ConsoleText.text = "User Not Agree with GDPR"; }
public void GDPRYES() { //Set GDPR to YES PlayerPrefs.SetInt("GDPR", 1); Yodo1U3dMas.SetGDPR(true); Debug.Log("User Agree with GDPR"); Text ConsoleText = GetComponent <AdsManager>().ConsoleText; ConsoleText.text = "User Agree with GDPR"; }
public void WatchForCoinSpin() { if (Yodo1U3dMas.IsRewardedAdLoaded()) { FindObjectOfType <AddsManager>().RemoveNetworkError(); Yodo1U3dMas.ShowRewardedAd(); } else { FindObjectOfType <AddsManager>().ShowNetworkError(); } }
public void SetStatusYes() { //Save user preference for YES PlayerPrefs.SetInt("CCPA", 1); Yodo1U3dMas.SetCCPA(true); PlayerPrefs.Save(); Debug.Log("User Agree with CCPA"); Text ConsoleText = GetComponent<AdsManager>().ConsoleText; ConsoleText.text = "User Agree with CCPA"; Yodo1U3dMas.InitializeSdk(); if (CCPAPopup.activeSelf) CCPAPopup.SetActive(false); }
void OnGUI() { int buttonHeight = Screen.height / 13; int buttonWidth = Screen.width / 2; int buttonSpace = buttonHeight / 2; int startHeight = buttonHeight / 2; if (GUI.Button(new Rect(Screen.width / 4, startHeight, buttonWidth, buttonHeight), "Show Banner Ad")) { if (Yodo1U3dMas.IsBannerAdLoaded()) { int align = Yodo1U3dBannerAlign.BannerTop | Yodo1U3dBannerAlign.BannerHorizontalCenter; Yodo1U3dMas.ShowBannerAd(align); } else { Debug.Log("[Yodo1 Mas] Banner ad has not been cached."); } } if (GUI.Button(new Rect(Screen.width / 4, startHeight + buttonHeight + buttonSpace, buttonWidth, buttonHeight), "Dismiss Banner Ad")) { Yodo1U3dMas.DismissBannerAd(); } if (GUI.Button(new Rect(Screen.width / 4, startHeight + buttonHeight * 2 + buttonSpace * 2, buttonWidth, buttonHeight), "Show Interstitial Ad")) { if (Yodo1U3dMas.IsInterstitialAdLoaded()) { Yodo1U3dMas.ShowInterstitialAd(); } else { Debug.Log("[Yodo1 Mas] Interstitial ad has not been cached."); } } if (GUI.Button(new Rect(Screen.width / 4, startHeight + buttonHeight * 3 + buttonSpace * 3, buttonWidth, buttonHeight), "Show Rewarded Ad")) { if (Yodo1U3dMas.IsRewardedAdLoaded()) { Yodo1U3dMas.ShowRewardedAd(); } else { Debug.Log("[Yodo1 Mas] Reward video ad has not been cached."); } } }
public void SetStatusNo() { //Save user preference for NO PlayerPrefs.SetInt("GDPR", 0); Yodo1U3dMas.SetGDPR(false); Debug.Log("User Not Agree with GDPR"); Text ConsoleText = GetComponent <AdsManager>().ConsoleText; ConsoleText.text = "User Not Agree with GDPR"; if (GDPRPopup.activeSelf) { GDPRPopup.SetActive(false); } }
public void SetStatusNo() { //Save user preference for NO, //and initialize the SDK with this privacy parameters PlayerPrefs.SetInt("CCPA", 0); Yodo1U3dMas.SetCCPA(false); ; PlayerPrefs.Save(); Debug.Log("User Not Agree with CCPA"); Text ConsoleText = GetComponent<AdsManager>().ConsoleText; ConsoleText.text = "User Not Agree with CCPA"; Yodo1U3dMas.InitializeSdk(); if (CCPAPopup.activeSelf) CCPAPopup.SetActive(false); }
IEnumerator BannerCoroutine() { yield return(new WaitForSeconds(2.0f)); if (isBannerShown == false) { if (Yodo1U3dMas.IsBannerAdLoaded()) { Yodo1U3dMas.ShowBannerAd(); } else { StartCoroutine(BannerCoroutine()); } } }
public void SetStatusNo() { //Save user preference for NO, and automatically //set GPDR and CCPA to NO closing the other popups //after that initialize the sdk with this privacy settings PlayerPrefs.SetInt("COPPA", 0); Yodo1U3dMas.SetCOPPA(false); PlayerPrefs.SetInt("GDPR", 0); Yodo1U3dMas.SetGDPR(true); PlayerPrefs.SetInt("CCPA", 0); Yodo1U3dMas.SetCCPA(false); GameObject CCPAPopup = GetComponent <CCPA>().CCPAPopup; Debug.Log("User Not Agree with CCPA"); GameObject GDPRPopup = GetComponent <GDPR>().GDPRPopup; Debug.Log("User Not Agree with GDPR"); CCPAPopup.SetActive(false); GDPRPopup.SetActive(false); Debug.Log("User Not Agree with COPPA"); Text ConsoleText = GetComponent <AdsManager>().ConsoleText; ConsoleText.text = "User Not Agree with COPPA"; if (COPPAPopup.activeSelf) { COPPAPopup.SetActive(false); } Yodo1U3dMas.InitializeSdk(); ConsoleText.text = "SDK initialized, COPPA, GDPR AND CCPA NOT AGREE"; }
public void InterstitialEvents() { Yodo1U3dMas.SetInterstitialAdDelegate((Yodo1U3dAdEvent adEvent, Yodo1U3dAdError error) => { Debug.Log("[Yodo1 Mas] InterstitialAdDelegate:" + adEvent.ToString() + "\n" + error.ToString()); switch (adEvent) { case Yodo1U3dAdEvent.AdClosed: Debug.Log("[Yodo1 Mas] Interstital ad has been closed."); break; case Yodo1U3dAdEvent.AdOpened: Debug.Log("[Yodo1 Mas] Interstital ad has been shown."); coins += 10; Coinstext.text = "Coins: " + coins.ToString(); ConsoleText.text = "Interstitial Ad Showed with Success \n Reward Received + 10 Coins"; break; case Yodo1U3dAdEvent.AdError: Debug.Log("[Yodo1 Mas] Interstital ad error, " + error.ToString()); break; } }); }
public void BannerEvents() { Yodo1U3dMas.SetBannerAdDelegate((Yodo1U3dAdEvent adEvent, Yodo1U3dAdError error) => { Debug.Log("[Yodo1 Mas] BannerdDelegate:" + adEvent.ToString() + "\n" + error.ToString()); switch (adEvent) { case Yodo1U3dAdEvent.AdClosed: Debug.Log("[Yodo1 Mas] Banner ad has been closed."); break; case Yodo1U3dAdEvent.AdOpened: Debug.Log("[Yodo1 Mas] Banner ad has been shown."); coins += 5; Coinstext.text = "Coins: " + coins.ToString(); ConsoleText.text = "Banner Ad Showed with Suces \n Reward Received + 5 coins"; break; case Yodo1U3dAdEvent.AdError: Debug.Log("[Yodo1 Mas] Banner ad error, " + error.ToString()); break; } }); }
public void ShowBanner() { ConsoleText.text = "Banner Ad Clicked "; Yodo1U3dMas.ShowBannerAd(); BannerEvents(); }
public void ShowVideoReward() { ConsoleText.text = "Rewarded Video Ad Clicked "; Yodo1U3dMas.ShowRewardedAd(); RewardedVideoEvents(); }
private void InitializeSdk() { Yodo1U3dMas.InitializeSdk(); }
public void ShowInterstitial() { ConsoleText.text = "Interstitial Ad Clicked "; Yodo1U3dMas.ShowInterstitialAd(); InterstitialEvents(); }
private void SetDelegates() { Yodo1U3dMas.SetInitializeDelegate((bool success, Yodo1U3dAdError error) => { Debug.Log("[Yodo1 Mas] InitializeDelegate, success:" + success + ", error: \n" + error.ToString()); if (success) { StartCoroutine(BannerCoroutine()); } else { } }); Yodo1U3dMas.SetBannerAdDelegate((Yodo1U3dAdEvent adEvent, Yodo1U3dAdError error) => { Debug.Log("[Yodo1 Mas] BannerdDelegate:" + adEvent.ToString() + "\n" + error.ToString()); switch (adEvent) { case Yodo1U3dAdEvent.AdClosed: Debug.Log("[Yodo1 Mas] Banner ad has been closed."); break; case Yodo1U3dAdEvent.AdOpened: Debug.Log("[Yodo1 Mas] Banner ad has been shown."); break; case Yodo1U3dAdEvent.AdError: Debug.Log("[Yodo1 Mas] Banner ad error, " + error.ToString()); break; } }); Yodo1U3dMas.SetInterstitialAdDelegate((Yodo1U3dAdEvent adEvent, Yodo1U3dAdError error) => { Debug.Log("[Yodo1 Mas] InterstitialAdDelegate:" + adEvent.ToString() + "\n" + error.ToString()); switch (adEvent) { case Yodo1U3dAdEvent.AdClosed: Debug.Log("[Yodo1 Mas] Interstital ad has been closed."); break; case Yodo1U3dAdEvent.AdOpened: Debug.Log("[Yodo1 Mas] Interstital ad has been shown."); break; case Yodo1U3dAdEvent.AdError: Debug.Log("[Yodo1 Mas] Interstital ad error, " + error.ToString()); break; } }); Yodo1U3dMas.SetRewardedAdDelegate((Yodo1U3dAdEvent adEvent, Yodo1U3dAdError error) => { Debug.Log("[Yodo1 Mas] RewardVideoDelegate:" + adEvent.ToString() + "\n" + error.ToString()); switch (adEvent) { case Yodo1U3dAdEvent.AdClosed: Debug.Log("[Yodo1 Mas] Reward video ad has been closed."); break; case Yodo1U3dAdEvent.AdOpened: Debug.Log("[Yodo1 Mas] Reward video ad has shown successful."); break; case Yodo1U3dAdEvent.AdError: Debug.Log("[Yodo1 Mas] Reward video ad error, " + error); break; case Yodo1U3dAdEvent.AdReward: Debug.Log("[Yodo1 Mas] Reward video ad reward, give rewards to the player."); break; } }); }
private void SetPrivacy(bool gdpr, bool coppa, bool ccpa) { Yodo1U3dMas.SetGDPR(gdpr); Yodo1U3dMas.SetCOPPA(coppa); Yodo1U3dMas.SetCCPA(ccpa); }
private void Start() { SetDelegates(); Yodo1U3dMas.InitializeSdk(); }