Forgive me if this is just my inexperience with C++ showing, but I have been trying to write some sequences that involve a CCFadeIn, a CCDelayTime, and a CCFadeOut, followed by a CCCallFunc, and I receive an error, “Cannot initialize a variable of type ‘cocos2d::CCSequence ’ with an value of type ’cocos2d::CCFiniteTimeAction’”. I’m using Xcode 4.3 to write the code and Cocos2d-x cocos2d-2.0-rc2-x-2.0.1. When I remove the CCDelayTime and just leave the two fades and the CCCallFunc, it works just fine, but the delay is pretty necessary.
It could be I’m doing something completely wrong; either way, does anyone have a suggestion? I was wondering if it was a bug, since in the previous versions of Cocos2d-x, before CCSequence::actions(action1, …) was deprecated, I seem to recall that it worked.
My code to duplicate is as follows:
@ CCFadeIn fadeInReadyText = CCFadeIn::create;
CCDelayTimereadyDelay = CCDelayTime::create(0.5f);
CCFadeOut fadeOutReadyText = CCFadeOut::create;
CCCallFunccallstartGame = CCCallFunc::create(this, callfunc_selector(HelloWorld::startGame));
CCSequence *readySequence = CCSequence::create(fadeInReadyText, readyDelay, fadeOutReadyText, callStartGame);