LoadedObject constructor

LoadedObject({
  1. required Size size,
  2. required int offsetHeight,
  3. required LoadedType type,
  4. List<double>? objectScale,
  5. ObjectType objectType = ObjectType.landscape,
  6. String path = '',
  7. String name = '',
  8. List<Rect>? spriteLocations,
  9. List<String>? spriteNames,
  10. bool show = true,
  11. int startingLayer = 1,
  12. Object? object,
})

Implementation

LoadedObject({
  required this.size,
  required this.offsetHeight,
  required this.type,
  List<double>? objectScale,
  this.objectType = ObjectType.landscape,
  this.path = '',
  this.name = '',
  List<Rect>? spriteLocations,
   this.spriteNames,
  this.show = true,
  this.startingLayer = 1,
  this.object
}){
  _spriteLocations = spriteLocations ?? [];
  this.objectScale = objectScale ?? (spriteLocations == null?[]:List<double>.filled(spriteLocations.length, 1.0));
}