Ads

These functions help you control advertisements shown in your game. Check out this page of the manual to learn how to monetize your game with advertisements. Note that you won’t see any ad banners or videos in the Preview window of BuildBox.

Static Function Description
hideBanner()

Hides a banner ad if it is visible.

isRemoveAdsPurchased()

Returns true if the user has paid to remove ads, and false if not.

isRewardedVideoAvailable()

Returns true if a rewarded video is available to show, and false if not.

showBanner()

Shows a banner ad.

showInterstitial()

Shows an interstitial (video advertisement) to the user.

showRewardedVideo(callback)

Shows Rewarded Video to the user. callback will be triggered when the video ends.


hideBanner()

Hides a banner ad if it is visible.

↑ Back to top


isRemoveAdsPurchased()

Returns true if the user has paid to remove ads, and false if not. Check this page of the manual to learn how to allow the user to pay to remove ads.

Returns

boolean true if the user has paid to remove ads, false if not

↑ Back to top


isRewardedVideoAvailable()

Returns true if a rewarded video is available to show, and false if not.

Returns

boolean true if a rewarded video is available to show, false if not

↑ Back to top


showBanner()

Shows a banner ad.

↑ Back to top


showInterstitial()

Shows an interstitial (video advertisement) to the user.

↑ Back to top


showRewardedVideo(callback)

Shows Rewarded Video to the user. callback will be triggered when the video ends.

let callback = function(){
    //when this fires, the rewarded video is complete. Give reward to player here 
}
 callback = callback.bind(this);
 Ads.showRewardedVideo(callback);

↑ Back to top

 

Did you find this page useful?

Please give it a rating:

Please provide some feedback!

This is very helpful to us.