reachable

fun reachable(l1: Locatable, l2: Locatable): Boolean

Whether or not the location may be reached. This will return false if one of the locations is not loaded, they're not on the same plane, or the distance between them is 0.



Note: this can be resource intensive, as it generates a path between these two locations to determine if they're reachable. This should only be used if you need to be certain that the point is reachable. Please consider using Tile.distanceTo

Return

true if the two points can reach each other, false otherwise.

Parameters

l1

Point A

l2

Point B

fun reachable(l1: Locatable, l2: Locatable, useBlocked: Boolean): Boolean

Whether or not the location may be reached. This will return false if one of the locations is not loaded, they're not on the same plane, or the distance between them is 0.



Note: this can be resource intensive, as it generates a path between these two locations to determine if they're reachable. This should only be used if you need to be certain that the point is reachable. Please consider using Tile.distanceTo

Return

true if the two points can reach each other, false otherwise.

Parameters

l1

Point A

l2

Point B

useBlocked

Uses Tile.blocked to determine if a tile is reachable