コード例 #1
0
    // 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.
    }
コード例 #2
0
 // 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";
 }
コード例 #3
0
    // 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.
    }
コード例 #4
0
 // 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";
 }