https://github.com/cocos2d/CocosBuilder/blob/develop/Documentation/4c.%20Connecting%20with%20cocos2d-x.md
onAssignCCBMemberVariable回调成员变量
CCB_MEMBERVARIABLEASSIGNER_GLUE(this, "mBurstSprite", CCSprite *, this->mBurstSprite); CCB_MEMBERVARIABLEASSIGNER_GLUE(this, "mTestTitleLabelTTF", CCLabelTTF *, this->mTestTitleLabelTTF);
bool HelloCocosBuilderLayer::onAssignCCBCustomProperty(CCObject* pTarget, const char* pMemberVariableName, cocos2d::extension::CCBValue* pCCBValue) { bool bRet = false; if (pTarget == this) { if (0 == strcmp(pMemberVariableName, "mCustomPropertyInt")) { this->mCustomPropertyInt = pCCBValue->getIntValue(); CCLog("mCustomPropertyInt = %d", mCustomPropertyInt); bRet = true; } else if ( 0 == strcmp(pMemberVariableName, "mCustomPropertyFloat")) { this->mCustomPropertyFloat = pCCBValue->getFloatValue(); CCLog("mCustomPropertyFloat = %f", mCustomPropertyFloat); bRet = true; } else if ( 0 == strcmp(pMemberVariableName, "mCustomPropertyBoolean")) { this->mCustomPropertyBoolean = pCCBValue->getBoolValue(); CCLog("mCustomPropertyBoolean = %d", mCustomPropertyBoolean); bRet = true; } else if ( 0 == strcmp(pMemberVariableName, "mCustomPropertyString")) { this->mCustomPropertyString = pCCBValue->getStringValue(); CCLog("mCustomPropertyString = %s", mCustomPropertyString.c_str()); bRet = true; } } return bRet; }
主页:
http://cocosbuilder.com/
源码:
https://github.com/cocos2d/CocosBuilder
cocos2d网站的分页:
http://www.cocos2d-iphone.org/forum/forum/16
作者做的使用例子:
http://code.zynga.com/2012/10/creating-a-game-with-cocosbuilder/
触控的一篇blog
http://blog.chukong-inc.com/index.php/2012/02/15/cocosbuiler%E4%BD%BF%E7%94%A8%E7%AE%80%E4%BB%8B%E5%BF%83%E5%BE%97/