Where do these go ?

I was looking at a tutorial on vungle ads and it tells me to put these two things somewhere :

ads.init( providerName, appId [, adListener] )
ads.show( adUnitType [, params] )​

Problem is I don’t know where to put them . These tutorials don’t tell you what file things should go in . My question is where should these two lines go?

Thank you .

Well I would call .init() in main.lua. The ads.show() needs to be where ever you want the ad to show. For instance if you want the ad to show in between your game and level over scene, perhaps you could call ads.show() during the level over’s scene:show()'s “did” phase. Or perhaps you have a button to earn free points for viewing videos, then you would call ad.show() in that button handler’s code.

Rob

Well I would call .init() in main.lua. The ads.show() needs to be where ever you want the ad to show. For instance if you want the ad to show in between your game and level over scene, perhaps you could call ads.show() during the level over’s scene:show()'s “did” phase. Or perhaps you have a button to earn free points for viewing videos, then you would call ad.show() in that button handler’s code.

Rob