Hi,
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 :
<pre>
id actionMove = ;
id actionMoveDone = ;
];
</pre>
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:
<pre>
CCMoveTo**actionMove = CCMoveTo::actionWithDuration(actualDuration, ccp(target>getContentSize().width/2, actualY));
target->runAction(CCSequence::actions(actionMove, actionMoveDone));
and the attempt to translate the second line…:
SelectorProtocol selectorProtocol = new SelectorProtocol;
CCCallFuncNactionMoveDone = CCCallFuncN::actionWithTarget(selectorProtocol, SEL_CallFuncN(target));