Interstitial
Last updated
Last updated
Interstitial ads typically appear during transitions in the game, such as level loading or after game over.
Set the minimum time interval between interstitial ad displays to comply with platform requirements and improve user experience.
To change the interval:
Check the interstitial_state
at the start of the game, and if the ad is opened
, perform the necessary actions (mute sounds/pause the game/etc.).
Track the state of the interstitial ad (loading, opened, closed, failed) to manage ad display and user experience.
Returns the current state of the interstitial ad. Possible values: loading
, opened
, closed
, failed
.
React to changes in ad state. For example, mute the game sound when the state is opened
and unmute when the state is closed
or failed
.
Display an interstitial ad at appropriate moments, such as during level transitions or game over screens.
Do not call show_interstitial()
method at the start of the game. On platforms where this is allowed, the ad will be shown automatically.