In cocos2d-iPhone we have a CCNode which:
- has a position
- has a size (wether we like it or not, it has)
- an anchor point
This is very useful to define areas on screen where that area has children that belong together. Like a group of buttons. We can easily hide/unhide everything just by hiding that parent CCNode.
What is the equivalent in cocos2d-x? I see that Node does not have a size. Layer seems like its going to be deprecated... and according to the docs, a Sprite is something that moves. Where is the logical stuff?
Node
in cocos2d-x (CC
prefix for v2 ) and then overridesetVisible()
function. (by iterating throughNode
's children and set their visibility recursively ) – Emadpres