reference from v0.92.
if a sprite is attached to a CCSpriteBatchNode, in CCSprite’s method function CCSprite::updateTransform(void), there is a recursive-like process that update transform matrix to world space(or root batch node).
It’s something weird that it assumes that any ancient node (include sprite itself) of sprite must be type of CCSprite. There are 2 lines in the code:
((CCSprite**)p)>getTransformValues;>getHornorParentTransform;
prevHonor = p)
**my question is:Is it neccessary to force every ancient to be CCSprite? ’Cause sometimes sprite’s parent or grandparent is just CCNode. this forced-type-conversion may not be safe.*
PS: about CCSprite::getTransformValue(), it is method of CCSprite, however none of CCSprite’s member has been used in this function. Members used in this function are totally declared in cocos2d::CCNode. Is there any reason that can not keep this function in cocos2d::CCNode ?