开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜