tilePropertiesListBelow method

List<Map<String, dynamic>>? tilePropertiesListBelow()

Method that checks what properties list map tile is currently

Implementation

List<Map<String, dynamic>>? tilePropertiesListBelow() {
  if (!hasGameRef) return null;
  final map = gameRef.map;
  if (map.tiles.isNotEmpty) {
    return map
        .getRendered()
        .where((element) {
          return (element.overlaps(rectConsideringCollision) &&
              (element.properties != null));
        })
        .map<Map<String, dynamic>>((e) => e.properties!)
        .toList();
  }
  return null;
}