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/
精彩评论