ActionwithAction和ActionwithDuration方法给出错误

时间:2013-07-31 05:39:49

标签: cocos2d-x

我有一个旧代码。我正在尝试将其移植到新版本的Cocos2dx它会给我以下几行中的错误。

CCSequence * pulseSequence = CCSequence::actionOneTwo(CCFadeIn::actionWithDuration(1), CCFadeOut::actionWithDuration(1));
CCRepeatForever* repeatAction = CCRepeatForever::actionWithAction(pulseSequence);

在ActiononeTwo,ActionwithDuration和ActionwithAction方法中。它告诉我它们不是CCSequence的一部分。

1 个答案:

答案 0 :(得分:2)

CCSequence * pulseSequence = CCSequence::createWithTwoActions(CCFadeIn::create(1), CCFadeOut::create(1));
CCRepeatForever* repeatAction = CCRepeatForever::create(pulseSequence);

这应该有用。