SpritesheetAnimator.setCurrentAnimation - HermesPasser/Ramu GitHub Wiki

SpritesheetAnimator.setCurrentAnimation()

Parameters

string nameID: Animation to be the current.

Description

Set the current animation.

You can test this snippet of code here.

let animator = new SpritesheetAnimator(10, 10, 35, 35);
animator.addAnimation('anim1', new SpritesheetAnimation(10, 10, 35, 35));
animator.setCurrentAnimation('anim1');