[cocos2dx 3.0 + ios]如何编写iAd的plugin(2)
来源:未知 责任编辑:责任编辑 发表时间:2014-05-20 18:26 点击:次
	   
	
	  
	  
	  
p>        [self.bannerView release];
p>        self.bannerView = nil;
p>    }
p>    [super dealloc];
p>}
p> 
p>#pragma mark InterfaceAds impl
p> 
p>// 设置开发者信息
p>- (void) configDeveloperInfo: (NSMutableDictionary*) devInfo
p>{
p>}
p> 
p>// 显示广告
p>- (void) showAds: (NSMutableDictionary*) info position:(int) pos
p>{
p>    NSString* strType = [info objectForKey:@"AppleType"];
p>    int type = [strType intValue];
p>    switch (type) {
p>        case kTypeBanner:
p>        {
p>            [self showBanner:pos];
p>            break;
p>        }
p>        case kTypeFullScreen:
p>            OUTPUT_LOG(@"Now not support full screen view in AppleType");
p>            break;
p>        default:
p>            OUTPUT_LOG(@"The value of 'AppleType' is wrong (should be 1 or 2)");
p>            break;
p>    }
p>}
p> 
p>- (void) hideAds: (NSMutableDictionary*) info
p>{
p>    NSString* strType = [info objectForKey:@"AppleType"];
p>    int type = [strType intValue];
p>    switch (type) {
p>        case kTypeBanner:
p>        {
p>            if (nil != self.bannerView) {
p>                [self.bannerView removeFromSuperview];
p>                [self.bannerView release];
p>                self.bannerView = nil;
p>            }
p>            break;
p>        }
p>        case kTypeFullScreen:
p>            OUTPUT_LOG(@"Now not support full screen view in AppleType");
p>            break;
p>        default:
p>            OUTPUT_LOG(@"The value of 'AppleType' is wrong (should be 1 or 2)");
p>            break;
p>    }
p>}
p> 
p>- (void) queryPoints
p>{
p>    OUTPUT_LOG(@"AdsApple not support query points!");
p>}
p> 
p>- (void) spendPoints: (int) points
p>{
p>    OUTPUT_LOG(@"AdsApple not support spend points!");
p>}
p> 
p>- (void) setDebugMode: (BOOL) isDebugMode
p>{
p>    self.debug = isDebugMode;
	
	
        
        
        
	
        相关新闻>>
最新推荐更多>>>
              
          - 发表评论
- 
				
- 最新评论 进入详细评论页>>

![cocos2d_x+lua[2]](/uploads/allimg/131030/110J64609-0-lp.jpg)








