TileMatrix

class TileMatrix(tile: Tile) : Interactive, InteractableEntity

TileMatrix An interactive tile matrix.

Constructors

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

Functions

actions
Link copied to clipboard
open override fun actions(): List<String>

The current actions for the entity.

basePoint
Link copied to clipboard
open override fun basePoint(): Point

{@inheritDoc}

boundingModel
Link copied to clipboard
fun boundingModel(): BoundingModel?

Gets the current bounding model

fun boundingModel(boundingModel: BoundingModel?)

Sets the bounding model

fun boundingModel(expectedModel: BoundingModel?, boundingModel: BoundingModel?)

Compares and sets the bounding model

bounds
Link copied to clipboard
fun bounds(): Polygon

Represents the model bounds as a Polygon

open override fun bounds(arr: IntArray?)

Sets the boundaries of this entity utilizing an array.

open override fun bounds(x1: Int, x2: Int, y1: Int, y2: Int, z1: Int, z2: Int)

Sets the boundaries of this entity.

calculateScreenPosition
Link copied to clipboard
open override fun calculateScreenPosition(): Callable<Point>
centerPoint
Link copied to clipboard
open override fun centerPoint(): Point

{@inheritDoc}

click
Link copied to clipboard
open override fun click(): Boolean
open override fun click(action: String?): Boolean
open override fun click(action: String?, option: String?): Boolean
open override fun click(f: Filter<MenuCommand>, useMenu: Boolean): Boolean

{@inheritDoc}

open override fun click(f: (MenuCommand) -> Boolean): Boolean
contains
Link copied to clipboard
open operator override fun contains(point: Point?): Boolean

Whether or not the entity contains the point.

doSetBounds
Link copied to clipboard
fun doSetBounds(arr: IntArray?): Filter<Interactable?>
draw
Link copied to clipboard
open override fun draw(g: Graphics)

Renders the entity within the viewport at alpha = 255

drawOnScreen
Link copied to clipboard
fun drawOnScreen(g: Graphics, text: String? = null, outlineColor: Int? = Color.GREEN, fillColor: Int? = null)
equals
Link copied to clipboard
open operator override fun equals(o: Any?): Boolean
hashCode
Link copied to clipboard
open override fun hashCode(): Int
interact
Link copied to clipboard
open override fun interact(f: (MenuCommand) -> Boolean): Boolean
open override fun interact(action: String?): Boolean
open override fun interact(f: Filter<MenuCommand>): Boolean
open override fun interact(f: (MenuCommand) -> Boolean, useMenu: Boolean): Boolean
open override fun interact(action: String?, useMenu: Boolean): Boolean
open override fun interact(action: String?, option: String?): Boolean
open override fun interact(f: Filter<MenuCommand>, useMenu: Boolean): Boolean
open override fun interact(action: String?, option: String?, useMenu: Boolean): Boolean

{@inheritDoc}

inViewport
Link copied to clipboard
open override fun inViewport(): Boolean

{@inheritDoc}

open override fun inViewport(checkIfObstructed: Boolean): Boolean

Returns true if the object is currently rendered in the viewport.

isRendered
Link copied to clipboard
open fun isRendered(): Boolean
mapPoint
Link copied to clipboard
fun mapPoint(): Point

Returns the point of which the tile exists on the map.

nextPoint
Link copied to clipboard
open override fun nextPoint(): Point

The next game screen point of the entity.

onMap
Link copied to clipboard
fun onMap(): Boolean

Whether or not the tile is on the map.

point
Link copied to clipboard
fun point(height: Int, tileHeight: Int? = null): Point

A default point which represents the centered position with the given height.

fun point(modX: Double, modY: Double, height: Int, tileHeight: Int? = null): Point
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
open override fun tile(): Tile

The current location of the entity.

toString
Link copied to clipboard
open override fun toString(): String
triangles
Link copied to clipboard
open override fun triangles(): Array<Polygon>

The translated model triangles.

valid
Link copied to clipboard
open override fun valid(): Boolean

Properties

boundingModel
Link copied to clipboard
var boundingModel: AtomicReference<BoundingModel?>
bounds
Link copied to clipboard
val bounds: Polygon
tile
Link copied to clipboard
val tile: Tile