摘要: -(void) setPosition:(CGPoint)pos{ CGSize screenSize = [[CCDirector sharedDirector] winSize]; float halfWidth = contentSize_.width * 0.5f; float halfHeight = contentSize_.height * 0.5f; // Cap the position so the Ship's sprite stays on the screen if (pos.x < halfWidth) { ... 阅读全文
posted @ 2012-05-19 22:40 高笑228 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 作为一个新手,运行他人的程序build时往往会在+ (id) layerWithColor:(ccColor4B)color{ return [[[self alloc] initWithColor:color] autorelease]; // <- ERROR HERE}处出现以下报错:Sending 'ccColor4B' (aka 'struct_ccColor4B') to parameter of incompatible type 'CIColor *'google了一下,发现问题在这里:+ (id) layerWithCol 阅读全文
posted @ 2012-05-19 10:45 高笑228 阅读(208) 评论(0) 推荐(0) 编辑