SpriteAnimation constructor

SpriteAnimation({
  1. int numberOfTiles = 0,
  2. int startFrame = 0,
  3. int repeat = -1,
  4. int fps = 60,
  5. int duration = -1,
  6. int tilesHorizontal = -1,
  7. int tilesVertical = -1,
  8. SpriteTexture? texture,
})

Implementation

SpriteAnimation({
  this.numberOfTiles = 0,
  this.startFrame = 0,
  this.repeat = -1,
  this.fps = 60,
  this.duration = -1,
  this.tilesHorizontal = -1,
  this.tilesVertical = -1,
  SpriteTexture? texture
}){
  currentTile = startFrame;
  this.texture = texture ?? SpriteTexture();
}