Hi,
I'm about to implement issue 346:
http://code.google.com/p/cocos2d-iphone/issues/detail?id=346
Basically you will be able to have a big family (grand-parent, parent, children, grand-children, etc) when using CCSpriteSheet.
For example you will be able to put an energy bar on top of your hero while using CCSpriteSheet
I'm going to implement more or less like this:
The new updatePosition will have more or less this:
// CCSprite#updatePosition
-(void)updatePosition
{
NSAssert( parentIsSpriteSheet_, @"updatePosition is only valid when CCSprite is using a CCSpriteSheet as parent");
float newRotation = rotation_;
float newScale = scale_;
float newPosition = position_;
Class aClass = [CCSpriteSheet class];
for (CCNode *p = parent; p = p.parent) {
if( [p isKindOfOfClass:aClass] )
break;
newRotation += [p rotation];
newScale *= [p scale];
newPosition = ccpAdd( newPosition, [p position]);
}
// ... code continues as in v0.9.0-alpha
//
}
and the addChild, removeChild, reorderChild both from CCSprite and CCSpriteSheet will be refactored.
What do you think ?