I have a problem with initWithTarget function, which You have translated from Objective-C.
It is located in in CCCallFunctionN class and it looks like this:
initWithTarget (SelectorProtocol pSelectorTarget, SEL_CallFuncN selector)
The problem is that this function look very different in Objective-C. I want to rewrite this tutorial: http://www.raywenderlich.com/352/how-to-make-a-simple-iphone-game-with-cocos2d-tutorial
to C+ , I think that it is good tutorial to begin with Cocos2d-x programming .
I don’t know how to use this function. In Objective-C as said in the simple-game tutorial You have only to write something like this :
id actionMove = ;
id actionMoveDone = ;
I have only rewritten two functions, first and the third, I don’t know how to translate to C+ the second.
The translated lines of code:
CCMoveTo**actionMove = CCMoveTo::actionWithDuration(actualDuration, ccp(
and the attempt to translate the second line…:
SelectorProtocol selectorProtocol = new SelectorProtocol;
CCCallFuncNactionMoveDone = CCCallFuncN::actionWithTarget(selectorProtocol, SEL_CallFuncN(target));