cocos2d adwhirl 集成:自动点击广告横幅
我正在将 adwhirl(iAd 和 admob)集成到我的 cocos2d 游戏中。目前的设置只是在游戏中显示横幅。现在我想删除游戏场景中的横幅,但是当你输掉游戏时,
[[[CCDirector sharedDirector] replaceScene: [LoseScene scene]];
我会在输掉的场景中添加一个横幅。但我想自动点击横幅。如何做到这一点?我在这里使用教程: http://emeene.com/2010/10/adwhirl- cocos2d-iphone/ 请帮我写代码。 (我认为它应该是一个类似touch的命令,相当于横幅区域内的实际触摸。(我只会在横幅成功加载时使用它)
i'm integrating adwhirl (iAd and admob) into my cocos2d game. the current setting is just showing the banner in the game. now i want to remove the banner in my game scene, but when you lose the game,
[[[CCDirector sharedDirector] replaceScene: [LoseScene scene]];
then i add a banner in the lose scene. but i want to auto click on the banner. How to do this? I use the tutorial here: http://emeene.com/2010/10/adwhirl-cocos2d-iphone/
plz help me with code. ( i think it should be a command like touch, equivalent to actual touch inside the banner area. (i will only use it when the banner is successfully loaded)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信广告提供商通常不允许您模拟用户点击广告。原因很简单:如果您作为程序员决定应该点击广告,那么您将为广告提供商产生成本,而用户实际上并没有兴趣获取有关广告的更多信息。
换句话说:允许程序员做你想做的事情会导致错误的页面印象,并为欺诈性应用程序行为打开大门。
如果您指的是全屏广告,那么您应该查找有关“插页式广告”的文档。这就是需要用户关闭的全屏广告在 iAd 和 AdMob 中的称呼。
I believe that ad providers generally don't allow you to simulate a user clicking on the ad. The reason is simple: if you, as the programmer, decide that the ad should be clicked, then you would generate costs for ad providers without the user actually being interested in getting more info on the ad.
In other words: allowing programmers to do what you are trying to do would cause false page impressions, and open the doors for fraudulent app behavior.
If instead you meant full-screen ads, then you should look for the documentation about "interstitials". That's what the full-screen ads that need to be dismissed by the user are called in iAd and AdMob.