摘要: texturepacker可以方便地制作纹理贴图集(Texture Atlases),而且可以免费试用。(可在官网申请免费liscence) 1 //利用软件将5帧png贴图生成1张大的png贴图和plist 2 CCSpriteFrameCache *frameCache = [CCSpriteFrameCache sharedSpriteFrameCache]; 3 //读取plist并缓存plist包含的贴图 4 [frameCache addSpriteFramesWithFile:@"sprite.plist"]; 5 NSMutableArray *frame. 阅读全文
posted @ 2013-08-22 19:04 CreeperChange 阅读(336) 评论(0) 推荐(0) 编辑
摘要: 1. 设置接受触摸事件,可在init方法里面写上[self setTouchEnabled: YES];旧版为self.isTouchEnabled = YES;xcode会报Deprecations ‘setIsTouchEnabled:’ is deprecated waring2. 覆盖方法- (void) registerWithTouchDispatcher{[[[CCDirector shareDirector] touchDispatcher] addTargetedDelegate:self priority:INT32_MIN+1 swallowsTouches:YES];} 阅读全文
posted @ 2013-08-22 18:30 CreeperChange 阅读(366) 评论(0) 推荐(0) 编辑