Exemplo n.º 1
0
    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;
            }
        });
    }
Exemplo n.º 2
0
    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;
            }
        });
    }
Exemplo n.º 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;
            }
        });
    }