tileTypeListBelow method

List<String> tileTypeListBelow()

Method that checks what types map tile is currently

Implementation

List<String> tileTypeListBelow() {
  if (!hasGameRef) return [];
  final map = gameRef.map;
  if (map.getRendered().isNotEmpty) {
    return map
        .getRendered()
        .where((element) {
          return (element.overlaps(rectConsideringCollision) &&
              (element.type?.isNotEmpty ?? false));
        })
        .map<String>((e) => e.type!)
        .toList();
  }
  return [];
}