示例#1
0
    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;
            }
        });
    }
示例#2
0
    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;
            }
        });
    }
示例#3
0
    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;
            }
        });
    }