Hello.
I am working on CocosBuilder and lua-scripts integration for my project now.
I use ccb markup file and lua-script file for each scene.
In lua-script variables of type “Owner var” available. And selectors in ccb with Target=“Owner” are binded with functions from lua-script.
To implement this functionality I have made some modifications in CCBCustomClassProtocol class:
- “bool callbackSetChildren(const char* name, cocos2d::CCObject* node)”
changed to
“bool callbackSetChildren(const char* name, cocos2d::CCObject* node, const char* type)”
It is necessary to define types of variables in lua-script, not just CCObject type.
- “cocos2d::SEL_MenuHandler callbackGetSelectors(const char* selectorName)”
changed to
“void callbackGetSelectors(const char* selectorName, cocos2d::CCObject*& target, cocos2d::SEL_MenuHandler& selector)”
I create wrapper-objects for selectors from script which I return as Target.
Can you apply this changed in main branch?
If you will apply it I can publish my integration as extension when it will be completed.