I write a sample to test animation, but it only shows the static pic _3_0001.png, animation can’t run normally.
I also try another code:
player~~>runAction));
the screen shows black blank and then quit.
the code as following:
CCSpriteFrameCache *cache = CCSpriteFrameCache::sharedSpriteFrameCache;
cache~~>addSpriteFramesWithFile(“jiuwei.plist”, “jiuwei.png”);
CCSprite **player = CCSprite::create;
player~~>setPosition/2,
/2) );
player~~>setDisplayFrame);
CCAnimation**animation = CCAnimation::create();
CCSpriteFrame frame = cache~~>spriteFrameByName;
animation~~>addSpriteFrame;
frame = cache~~>spriteFrameByName;
animation~~>addSpriteFrame;
frame = cache~~>spriteFrameByName;
animation~~>addSpriteFrame;
CCAnimateanimate = CCAnimate::create(animation);
CCRepeatForever *repeatAction = CCRepeatForever::create(animate);
animation~~>setDelayPerUnit;
animate~~>setDuration(10.1f);
player~~>runAction;
this~~>addChild(player,1);