clone method

SpriteAnimation clone()

Returns a new Animation equal to this one in definition, but each copy can be run independently.

Implementation

SpriteAnimation clone() {
  return SpriteAnimation(frames.toList(), loop: loop);
}