Is this topic a bug when parsing ccbi in cocos2dx ?


#1

Test is a node ccbi file embedded in MainScene.ccbi
void Test::onNodeLoaded(CCNode * pNode, CCNodeLoader * pNodeLoader) { CCLog("Test Node Loaded!"); pNode->setTag(100); // *here set the node's tag 100* }

then run again to the end of function:
CCNode * CCNodeLoader::parsePropTypeCCBFile(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader) { return ccbFileNode; // here the ccbFileNode's Tag is 100, right! }

However, above function return to :

@
void CCNodeLoader::parseProperties(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader) {
case kCCBPropTypeCCBFile: {
CCNode * ccbFileNode = this~~>parsePropTypeCCBFile; // here ccbFileNode’s Tag is 0! wrong!
if {
this~~>onHandlePropTypeCCBFile(pNode, pParent, propertyName.c_str(), ccbFileNode, pCCBReader);
}
break;
}

}
@

is this a bug?

I just want to know the Node’s type that is created by CCB, so I set tag to Node when loaded finish.
Is there some examples processing collision using CCB ?

Ths!