摘要:
-(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) { ... 阅读全文
摘要:
作为一个新手,运行他人的程序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 阅读全文