Locatable

interface Locatable

Types

Matcher
Link copied to clipboard
class Matcher(target: Locatable) : Filter<Locatable?>

Matcher

NearestTo
Link copied to clipboard
class NearestTo(target: Locatable) : Comparator<Locatable?>

NearestTo

WithinArea
Link copied to clipboard
class WithinArea(area: Area) : Filter<Locatable?>

WithinArea

WithinRange
Link copied to clipboard
class WithinRange(target: Locatable, distance: Double) : Filter<Locatable?>

WithinRange

Functions

isRendered
Link copied to clipboard
open fun isRendered(): Boolean
reachable
Link copied to clipboard
open fun reachable(): Boolean

Whether or not the Locatable can be reached. If the tile is blocked, the nearest unblocked tile will be used.

tile
Link copied to clipboard
abstract fun tile(): Tile

The current location of the entity.

Inheritors

InteractableEntity
Link copied to clipboard
Tile
Link copied to clipboard
Actor
Link copied to clipboard
DynamicObject
Link copied to clipboard
GroundItem
Link copied to clipboard
Projectile
Link copied to clipboard

Extensions

getWalkableNeighbor
Link copied to clipboard
fun Locatable.getWalkableNeighbor(allowSelf: Boolean = true, diagonalTiles: Boolean = false, checkForWalls: Boolean = true, filter: (Tile) -> Boolean = { true }): Tile?

Returns: Tile nearest neighbor or self as which is walkable

getWalkableNeighbors
Link copied to clipboard
fun Locatable.getWalkableNeighbors(allowSelf: Boolean = true, diagonalTiles: Boolean = false, checkForWalls: Boolean = true): MutableList<Tile>
onMap
Link copied to clipboard
fun Locatable.onMap(): Boolean