开发者

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];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜