totalDuration method
Computes the total duration of this animation (before it's done or repeats).
Implementation
double totalDuration() {
return spriteAnimation.frames
.map((f) => f.stepTime)
.reduce((a, b) => a + b);
}
Computes the total duration of this animation (before it's done or repeats).
double totalDuration() {
return spriteAnimation.frames
.map((f) => f.stepTime)
.reduce((a, b) => a + b);
}