I’m playing around with the framework, it looks good!
Now I’m just trying to modify the HelloWorld app and create a re-usable class (eg init level by name), to do this I’m trying to pass the name to init().
This is what I have so far:
class StarJumpScene : public cocos2d::CCLayer
{
public:
// Originally this was init()
virtual bool init(const char* levelName);
static cocos2d::CCScene* scene();
// Original comment by cocos: implement the “static node()” method manually
CREATE_FUNC(StarJumpScene);
};
I’m getting a compilation error at line with CREATE_FUNC:
The error is: Error 1 error C2660: ‘StarJumpScene::init’ : function does not take 0 arguments
As init expects now an argument (which I do not know at compile time), I don’t want to hard code it here…
Am I supposed to override the node() method? (just reading the comment there)
Thanks,
Nik