AnimatedSprite constructor
AnimatedSprite({
- String? imagePath,
- required Transform2D transform,
- List<
Frame> frames = const [], - int index = 0,
- 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);