addObjectsWithLocation method

ObjectsSpawned addObjectsWithLocation(
  1. VectorDefinition location,
  2. List<GameObject> objects
)

Implementation

ObjectsSpawned addObjectsWithLocation(
  VectorDefinition location,
  List<GameObject> objects,
) => copyWith(
  objects: {
    ...this.objects,
    location: [...?this.objects[location], ...objects],
  },
);