开发者

How to overlap sprites in cocos2d

开发者 https://www.devze.com 2023-04-02 20:32 出处:网络
How will I show 2 sprites on same layer. Presently sprites with h开发者_开发技巧orizontal image is coming behind the other sprites. Horizontal image sprites drawing in CCRibbon class. Well, you could

How will I show 2 sprites on same layer. Presently sprites with h开发者_开发技巧orizontal image is coming behind the other sprites. Horizontal image sprites drawing in CCRibbon class.


Well, you could assign them a z order. This is done by using code like this:

[self addChild: MySprite z:1]

The higher the z order, the highest up the sprite will be.

0

精彩评论

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