/// <summary> /// Gets all obstructing <see cref="AirtightComponent"/> instances in a specific tile. /// </summary> /// <param name="mapGrid">The grid where to get the tile.</param> /// <param name="tile">The indices of the tile.</param> /// <returns>The enumerator for the airtight components.</returns> public AtmosObstructionEnumerator GetObstructingComponentsEnumerator(IMapGrid mapGrid, Vector2i tile) { var ancEnumerator = mapGrid.GetAnchoredEntitiesEnumerator(tile); var airQuery = GetEntityQuery <AirtightComponent>(); var enumerator = new AtmosObstructionEnumerator(ancEnumerator, airQuery); return(enumerator); }