play method

void play(
  1. String animation, {
  2. int stepTime = 200,
  3. bool loop = true,
  4. dynamic onComplete,
})

播放动画

Implementation

void play(String animation, {int stepTime = 200, bool loop = true, onComplete}) {
  if (this.currentAnimation != animation) {
    this.currentIndex = 0;
    this.currentAnimation = animation;
    this.stepTime = stepTime;
    this.loop = loop;
    this.onComplete = onComplete;
    /*print("Play:" +
        animation.toString() +
        ",frames:" +
        this.frames[this.currentAnimation]!.length.toString() +
        ",stepTime:" +
        stepTime.toString());*/
  }
}