AnimatedSprite constructor

AnimatedSprite({
  1. String? imagePath,
  2. required Transform2D transform,
  3. List<Frame> frames = const [],
  4. int index = 0,
  5. double time = 0.0,
})

Implementation

AnimatedSprite({
  this.imagePath,
  required this.transform,
  this.frames = const [],
  this.index = 0,
  this.time = 0.0,
}) : totalTime = frames.fold(0.0, (prev, frame) => prev + frame.duration);