PixelTile.animated constructor

PixelTile.animated(
  1. List<PixelArt> frames, {
  2. required double stepTime,
  3. bool collision = false,
  4. String? tileClass,
  5. Map<String, dynamic>? properties,
})

An animated tile, cycling through frames every stepTime seconds.

Implementation

PixelTile.animated(
  this.frames, {
  required this.stepTime,
  this.collision = false,
  this.tileClass,
  this.properties,
}) {
  if (frames.isEmpty) {
    throw ArgumentError('PixelTile.animated: `frames` cannot be empty.');
  }
}