Quantcast
Channel: cocos2d-x - Cocos Forums
Viewing all articles
Browse latest Browse all 2748

Is it possible to start from specific frame number with RepeatForever

$
0
0

@doxes wrote:

I have 10 frames animation, When I stop animation at frame 5 I want to start animation from this 5th frame.

anyone know how to start from specific frame number to loop forever?

Code is like this;

auto frames = getAnimation("%04d.png", 10);
auto animation = Animation::createWithSpriteFrames(frames, 1.0f/ 30  );
runAction_ = sprite3->runAction(RepeatForever::create(Animate::create(animation)));

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 2748

Trending Articles