tileListBelow method

Iterable<TileComponent> tileListBelow()

Method that checks what map tiles is below

Implementation

Iterable<TileComponent> tileListBelow() {
  if (!hasGameRef) return [];
  final map = gameRef.map;
  if (map.layers.isNotEmpty) {
    return map.getRenderedTiles().where((element) {
      return (element.overlaps(rectCollision) &&
          (element.properties != null));
    });
  }
  return [];
}