It seems CCAnimation missing the corresponding method animationWithFrame:frameCount:delay: from cocos2d-iphone. The usage is kind like:
CCAnimation* anim = [CCAnimation animationWithFrame:animName frameCount:5 delay:0.08f];
Implementing is straightforward as what I did below in cocos2d-x:
CCAnimation* createWithFrame(const char* animationName, int frameCount, float delay)
{
>
char name[128];
CCArray* frames = CCArray::createWithCapacity(count);
for(int i=0;i<frameCount;++i)
{
sprintf(name, “sd.png\0”, animationName, i);
>
CCSpriteFrame* frame = CCSpriteFrameCache::sharedSpriteFrameCache()>spriteFrameByName;>addObject(frame);
frames
}
>
CCAnimation* animation = CCAnimation::createWithSpriteFrames(frames, delay);
return animation;
}
>
Hope it helps.