Levels constructor

Levels({
  1. String name = '',
  2. List<TileLayers>? tileLayer,
  3. List<TileAnimations>? animations,
  4. List<Object>? objects,
  5. Grid? grid,
  6. int selectedTileLayer = 0,
  7. Size? maxGridSize,
})

Implementation

Levels({
  this.name = '',
  List<TileLayers>? tileLayer,
  List<TileAnimations>? animations,
  List<Object>? objects,
  Grid? grid,
  this.selectedTileLayer = 0,
  Size? maxGridSize
}){
  this.grid = grid ?? Grid();
  this.maxGridSize = maxGridSize ?? Size(this.grid.width.toDouble(),this.grid.height.toDouble());
  this.tileLayer = tileLayer??[TileLayers(length: currentGridLength)];
  this.animations = animations??[];
  this.objects = objects??[];
}