getObjects method

Map<int, GameObject>? getObjects(
  1. WorldState state
)

Implementation

Map<int, GameObject>? getObjects(WorldState state) {
  if (objects == null) return null;
  final cellObject =
      state.getTableOrDefault(cell.table).getCell(cell.position);
  return Map.fromEntries(objects!.map((e) {
    final object = cellObject.objects.elementAtOrNull(e);
    if (object == null) return null;
    return MapEntry(e, object);
  }).nonNulls);
}