// When an ad is available it can be shown
    void AdAvailableHandler(enumAdType adType)
    {
        if (adType == enumAdType.RewardVideo)
        {
            Spil.Instance.PlayVideo();
        }
        else if(adType == enumAdType.MoreApps)
        {
            Spil.Instance.PlayMoreApps();
        }

        // Interstitials aren't played on command but are automatically played by the SpilSDK
        // when certain events are fired such as "levelComplete" or "playerDies".
        // Which events trigger interstitials is configured by Spil.
        // Interstitials do trigger OnAdStarted and OnAdFinished events when they play.
    }
    // When an ad is available it can be shown
    void AdAvailableHandler(enumAdType adType)
    {
        txtStatus1.text = adType.ToString() + " available";

        if (adType == enumAdType.RewardVideo)
        {
            Spil.Instance.PlayVideo();
        }
        else if (adType == enumAdType.MoreApps)
        {
            Spil.Instance.PlayMoreApps();
        }

        // Interstitials aren't played on command but are automatically played by the SpilSDK
        // when certain events are fired such as "levelComplete" or "playerDies".
        // Which events trigger interstitials is configured by Spil.
        // Interstitials do trigger OnAdStarted and OnAdFinished events when they play.
    }
Exemplo n.º 3
0
        public enumAdType GetTypeAsEnum()
        {
            enumAdType adType = enumAdType.Unknown;

            if (type.ToLower().Trim().Equals("rewardvideo"))
            {
                adType = enumAdType.RewardVideo;
            }
            else if (type.ToLower().Trim().Equals("interstitial"))
            {
                adType = enumAdType.Interstitial;
            }
            else if (type.ToLower().Trim().Equals("moreapps"))
            {
                adType = enumAdType.MoreApps;
            }
            if (adType == enumAdType.Unknown)
            {
                Debug.Log("SpilSDK-Unity AdNotAvailable event fired but type is unknown. Type: " + type);
            }
            return(adType);
        }
 // When an ad is not available the UI may have to be updated,
 // for instance to hide a button.
 void AdNotAvailableHandler(enumAdType adType)
 {
     txtStatus1.text = adType.ToString() + " was not available";
 }
 // When an ad is not available the UI may have to be updated,
 // for instance to hide a button.
 void AdNotAvailableHandler(enumAdType adType)
 {
     Debug.Log("Ad was not available");
 }
 // When an ad is not available the UI may have to be updated,
 // for instance to hide a button.
 void AdNotAvailableHandler(enumAdType adType)
 {
     txtStatus1.text = adType.ToString() + " was not available";
 }