Esempio n. 1
0
    void Start()
    {
        isTimes = true;

        Yodo1U3dAds.SetLogEnable(true);

        Yodo1U3dAds.SetUserConsent(true);
        Yodo1U3dAds.SetTagForUnderAgeOfConsent(false);
        Yodo1U3dAds.SetDoNotSell(false);
        Yodo1U3dAds.InitializeSdk();
        Yodo1U3dAdsSDK.setBannerdDelegate((Yodo1U3dAdsConstants.AdEvent adEvent, string error) =>
        {
            Debug.Log("[Yodo1 Ads] BannerdDelegate:" + adEvent + "\n" + error);
            switch (adEvent)
            {
            case Yodo1U3dAdsConstants.AdEvent.AdEventClick:
                Debug.Log("[Yodo1 Ads] Banner advertising has been clicked.");
                break;

            case Yodo1U3dAdsConstants.AdEvent.AdEventClose:
                Debug.Log("[Yodo1 Ads] Banner advertising has been closed.");
                break;

            case Yodo1U3dAdsConstants.AdEvent.AdEventShowSuccess:
                Debug.Log("[Yodo1 Ads] Banner advertising has been shown.");
                break;

            case Yodo1U3dAdsConstants.AdEvent.AdEventShowFail:
                Debug.Log("[Yodo1 Ads] Banner advertising show failed, the error message:" + error);
                break;
            }
        });

        Yodo1U3dAdsSDK.setInterstitialAdDelegate((Yodo1U3dAdsConstants.AdEvent adEvent, string error) =>
        {
            Debug.Log("[Yodo1 Ads] InterstitialAdDelegate:" + adEvent + "\n" + error);
            switch (adEvent)
            {
            case Yodo1U3dAdsConstants.AdEvent.AdEventClick:
                Debug.Log("[Yodo1 Ads] Interstital advertising has been clicked.");
                break;

            case Yodo1U3dAdsConstants.AdEvent.AdEventClose:
                Debug.Log("[Yodo1 Ads] Interstital advertising has been closed.");
                break;

            case Yodo1U3dAdsConstants.AdEvent.AdEventShowSuccess:
                Debug.Log("[Yodo1 Ads] Interstital advertising has been shown.");
                break;

            case Yodo1U3dAdsConstants.AdEvent.AdEventShowFail:
                Debug.Log("[Yodo1 Ads] Interstital advertising show failed, the error message:" + error);
                break;
            }
        });

        Yodo1U3dAdsSDK.setRewardVideoDelegate((Yodo1U3dAdsConstants.AdEvent adEvent, string error) =>
        {
            Debug.Log("[Yodo1 Ads] RewardVideoDelegate:" + adEvent + "\n" + error);
            switch (adEvent)
            {
            case Yodo1U3dAdsConstants.AdEvent.AdEventClick:
                Debug.Log("[Yodo1 Ads] Reward video advertising has been clicked.");
                break;

            case Yodo1U3dAdsConstants.AdEvent.AdEventClose:
                Debug.Log("[Yodo1 Ads] Reward video advertising has been closed.");
                break;

            case Yodo1U3dAdsConstants.AdEvent.AdEventShowSuccess:
                Debug.Log("[Yodo1 Ads] Reward video advertising has shown successful.");
                break;

            case Yodo1U3dAdsConstants.AdEvent.AdEventShowFail:
                Debug.Log("[Yodo1 Ads] Reward video advertising show failed, the error message:" + error);
                break;

            case Yodo1U3dAdsConstants.AdEvent.AdEventFinish:
                Debug.Log(
                    "[Yodo1 Ads] Reward video advertising has been played finish, give rewards to the player.");
                break;
            }
        });

        Yodo1U3dAdsSDK.setRewardGameDelegate((string reward, string error) =>
        {
            Debug.Log("[Yodo1 Ads] RewardGameDelegate:" + reward + "\n" + error);
        });
    }
Esempio n. 2
0
 public void InitializeAds()
 {
     Yodo1U3dAds.InitializeSdk();
     SetListners();
 }