cocos2d zorder is not working
is there any tutorial on zorder for cocos2d? I have a sprite in a parent layer that always appears behind the sprite in the child layer. I thought just setting the 开发者_开发百科z would work, but I can see that is not possible.
Try this, Here the z value is the z-order.
CCSprite *sprite = [CCSprite spriteWithFile:@"image.png"];
[self addChild:sprite z:100];
精彩评论