Hi,
I am currently working on a game and I plan to insert an interstitial ad from Appodeal in a pause scene.
However, the ad only shows up the first time I click the pause button, so I wonder how exactly should I do to make it appear every time I click the pause button?
Here’s my integration code:
local appodeal = require( “plugin.appodeal” )
local function adListener( event )
if ( event.phase == “init” ) then
– Successful initialization
appodeal.show(“interstitial”)
elseif ( event.phase == “failed” ) then – The ad failed to load
print( event.type )
print( event.isError )
print( event.response )
end
end
appodeal.init( adListener, { appKey=“281d532d2b1cea19d51dd7531179e683c5c2a6b614c29424”, testMode = true } )
I inserted these codes before the scene:create function.
(When the pause button is clicked, a scene overlay is displayed. These codes are within the scene that overlays the current game scene.)