How can we repeat the animation more than one time , while it’s created with spriteframes ,
the code is written below :
var animation = this.getComponent(cc.Animation);
cc.loader.loadRes("test assets/atlas", cc.SpriteAtlas, (err, atlas) => {
var spriteFrames = atlas.getSpriteFrames();
var clip = cc.AnimationClip.createWithSpriteFrames(spriteFrames, 10);
clip.name = 'run';
clip.wrapMode = cc.WrapMode.Loop;
animation.addClip(clip);
animation.play('run');
});
Thanks