CCSpriteBatchNode changes opacity of frame - Cocos2d
When I add a sprite to my scene from
[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:
@"b.plist"];
bspriteSheet = [CCSpriteBatchNode batchNodeWithFile:@"b.png"];
[self addChild:bspriteSheet z:-1];
the opacity of the sprite is lighter than it was originally and the images look fine in "开发者_如何学Pythonb.png". Does anyone know why it is doing this and is there a way to fix it?
Possibly because it's z-index is behind another view which is then somehow masking it. Try changing the z-index to 0 or 1 and see if that works.
精彩评论