In Game Ads
All Out allows developers to show players advertisements in their game
Rewarded
API Reference
Ads :: struct {
prompt_rewarded_ad :: proc(
player: Player,
reward_id: string,
title: string,
description: string,
texture: Texture_Asset
);
is_ad_showing :: proc() -> bool;
}show_coin_ad :: proc(player: Player) {
if Ads.is_ad_showing() return;
icon := get_asset(Texture_Asset, "ui/coin.png");
Ads.prompt_rewarded_ad(
player,
"coins_100",
"Earn 100 coins",
"Watch an ad to receive 100 coins.",
icon
);
}
ao_ads_reward_handler :: proc(player: Player, reward_id: string) -> bool {
if reward_id != "coins_100" return false;
Economy.deposit_currency(player, "Coins", 100);
return true;
}Interstitial
Last updated