If you know the individual frames and how it is spanned you can do this:
auto shootAnim = Animation3D::create("Army.c3b");//Read all animation clips
auto shoot = Animate3D::createWithFrames(shootAnim, 40, 79);//Extract frames 40-79
shoot->setSpeed(2);
army->runAction(RepeatForever::create(shoot));
If you know the name of the animation, or if the frames are layered instead of in sequence, you can do this instead:
auto shootAnim = Animation3D::create("Army.c3b","Shoot");//Read only 'Shoot' frames
auto shoot = Animate3D::create(shootAnim);
shoot->setSpeed(2);
army->runAction(RepeatForever::create(shoot));
No comments:
Post a Comment