开发者

In Cocos2d, how to create a layer that I can set its area size, and only its children that belongs in this area will be shown?

Currently, no matter how big the layer is, when I add a child sprite to it, the sprite will be shown on the screen开发者_如何学C. But if I want to restrict the visible area of the layer and only show children that is inside this area, how can I do it?


You should give ClippingNode a go here: http://www.learn-cocos2d.com/2011/01/cocos2d-gem-clippingnode/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜