0
我遵循Microsoft的文檔,在我的混合遊戲中包含微軟廣告。一切工作正常,但「測試廣告」是不可見的!但是,如果我挖掘出應該的位置,它會打開冰。這裏我繪製:混合應用程序WP7:廣告不可見,但可點擊
private void OnDraw(object sender, GameTimerEventArgs e)
{
SharedGraphicsDeviceManager.Current.GraphicsDevice.Clear(Color.CornflowerBlue);
spriteBatch.Begin();
background.Draw(spriteBatch);
// Draw the Enemies
for (int i = 0; i < Plattforms.Count; i++)
{
Plattforms[i].Draw(spriteBatch);
}
powerbar.DrawPower(spriteBatch);
player.Draw(spriteBatch);
particleComponent.Draw(spriteBatch);
particleComponentfinal.Draw(spriteBatch);
spriteBatch.DrawString(font, level.score.ToString(), new Vector2(20, 20), Color.White);
if (bg.donebook == true) { spriteBatch.Draw(bg.done, new Vector2(0, 0), Color.White); }
if (countdown == true) { spriteBatch.DrawString(countfont, countdowntime.ToString(), new Vector2(360, 200), Color.White); }
// draw the ad control
AdComponent.Current.Draw();
spriteBatch.End();
}
是的,我完全按照這個指南,我的矩形是480x80,因爲它應該是。 – Michael
AdComponent.Initialize(「test_client」); Microsoft.Xna.Framework.Rectangle rect = new Microsoft.Xna.Framework.Rectangle(0,0,480,80); drawableAd = AdComponent.Current.CreateAd(「Image480_80」,rect,true); drawableAd.AdRefreshed + = new EventHandler(drawableAd_AdRefreshed); drawableAd.ErrorOccurred + = new EventHandler(drawableAd_ErrorOccurred); 我的初始化代碼。 –
Michael
這是一個風景爲主的廣告? – Malachi