Jump to content

Banner Ads - Tutorial [CocoonJS + (Phaser / HTML5 Game)]


iShellz
 Share

Recommended Posts

Awesome post, I have my mopub and Admob accounts all set up but I'm having some issues with the new cocoon.io compiler.

As far as I can tell you no longer need to include the js files, you just add the plugin whilst compiling? Also I can't find any option to insert my Ad Unit ID's on cocoons new setup, do I specify this inside my phaser state with the code below? Or do I need to add the unit ID's as parameters when installing the plugin?

//Global configurationCocoon.Ads.configure({    banner:"agltb3B1Yi1pbmNyDQsSBFNpdGUxxxxxxx",    interstitial:"agltb3B1Yi1pbmNyDQsSBFNpdGUyyyyyyy"})//Or platform specific configurationCocoon.Ads.configure({    ios: {         banner:"agltb3B1Yi1pbmNyDQsSBFNpdGUxxxxxxx",         bannerIpad:"agltb3B1Yi1pbmNyDQsSBFNpdGUzzzzz", //optional         interstitial:"agltb3B1Yi1pbmNyDQsSBFNpdGUyyyyyyy",         interstitialIpad:"agltb3B1Yi1pbmNyDQsSBFNpdGUtttttt", //optional    },    android: {         banner:"agltb3B1Yi1pbmNyDQsSBFNpdGUwwwwww",         interstitial:"agltb3B1Yi1pbmNyDQsSBFNpdGUhhhhhh"    });*

Any help on this would be much appreciated!



EDIT:
Figured this out in the end, you add the code into your phaser state. If anyone else needs some help with this feel free to message me.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...