- Register your WP7 app in AdDuplex system and write down your AppId
- Download AdDuplex XNA Ad Library and extract it to a directory of your choice.
- Add a reference to AdDuplex.Xna.dll to your WP7 app.
- Add using AdDuplex.Xna; directive to your code
- Declare a field to hold an instance of AdDuplex AdManager class:
AdManager adDuplex;
- Create an instance of AdManager and call it's LoadContent() method (generally in LoadContent() method of your game)
adDuplex = new AdManager(this, "0" /* your Ad unit ID here */); adDuplex.LoadContent();
- In your Update() method override call Update method of AdManager:
adDuplex.Update(gameTime);
- In the end of your Draw() method override call Draw() method of AdManager:
adDuplex.Draw(spriteBatch, adPosition);
See included SampleXnaApp for a sample application implementing AdDuplex library.
Comments