Constructors

GameObject
Link copied to clipboard
fun GameObject(obj: BasicObject<*>?, type: GameObject.Type)

Types

Companion
Link copied to clipboard
object Companion
StoredConfig
Link copied to clipboard
data class StoredConfig(config: IObjectConfig?)
Type
Link copied to clipboard
enum Type : Enum<GameObject.Type>

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
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.

createAction
Link copied to clipboard
open override fun createAction(action: String?): ObjectAction
open override fun createAction(action: String?, async: Boolean): ObjectAction
doSetBounds
Link copied to clipboard
fun doSetBounds(arr: IntArray?): Filter<Interactable?>
downscale
Link copied to clipboard
open fun downscale(downscale: Boolean): GameObject
draw
Link copied to clipboard
open override fun draw(g: Graphics)

Renders the entity within the viewport at alpha = 255

dynamicObject
Link copied to clipboard
fun dynamicObject(): DynamicObject
equals
Link copied to clipboard
open operator override fun equals(o: Any?): Boolean
getModelCacheId
Link copied to clipboard
fun getModelCacheId(): Long
getObjectsTopLeftTile
Link copied to clipboard
fun getObjectsTopLeftTile(tile: Tile, xSize: Int, ySize: Int): Tile

Gets the top left tile of this gameobject.

getWalkableNeighbours
Link copied to clipboard
fun getWalkableNeighbours(allowSelf: Boolean = true): List<Tile>

Gets North/east/west/south neighbours. Did not get diagonal since gameobjects make it painful to check since you gameobjects don't let you check game object flags going out and coming since they are unwalkable.

hashCode
Link copied to clipboard
open override fun hashCode(): Int
height
Link copied to clipboard
fun height(): Int
hull
Link copied to clipboard
open fun hull(): Polygon
id
Link copied to clipboard
open override fun id(): Int

The identifier of this entity

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
localX
Link copied to clipboard
open override fun localX(): Int

{@inheritDoc}

localY
Link copied to clipboard
open override fun localY(): Int

{@inheritDoc}

mainId
Link copied to clipboard
fun mainId(): Int
meshIds
Link copied to clipboard
fun meshIds(): IntArray
meta
Link copied to clipboard
fun meta(): Int
model
Link copied to clipboard
open override fun model(): Model?

Load the model from the cache

modelCenterPoint
Link copied to clipboard
open fun modelCenterPoint(): Point

Get the center point of the model

modelHeight
Link copied to clipboard
open fun modelHeight(): Int?
modelOrientations
Link copied to clipboard
open override fun modelOrientations(): IntArray

The orientations of the entity

modifiedColors
Link copied to clipboard
fun modifiedColors(): ShortArray
name
Link copied to clipboard
open override fun name(): String
nextPoint
Link copied to clipboard
open override fun nextPoint(): Point

The next game screen point of the entity.

nil
Link copied to clipboard
open override fun nil(): GameObject

A "null" instance. An object with no function. All methods will not evaluate to anything.

orientation
Link copied to clipboard
fun orientation(): Int
originalColors
Link copied to clipboard
fun originalColors(): ShortArray
reachable
Link copied to clipboard
open override fun reachable(): Boolean

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

relative
Link copied to clipboard
fun relative(): Int
renderables
Link copied to clipboard
open override fun renderables(): Array<IRenderable>
tile
Link copied to clipboard
open override fun tile(): Tile

The current location of the entity.

tileHeight
Link copied to clipboard
open override fun tileHeight(): Int?
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.

type
Link copied to clipboard
fun type(): GameObject.Type
useHull
Link copied to clipboard
open fun useHull(useHull: Boolean): GameObject
valid
Link copied to clipboard
open override fun valid(): Boolean
width
Link copied to clipboard
fun width(): Int

Properties

boundingModel
Link copied to clipboard
var boundingModel: AtomicReference<BoundingModel?>
downscale
Link copied to clipboard
open override var downscale: Boolean = true
name
Link copied to clipboard
val name: String
tile
Link copied to clipboard
val tile: Tile
type
Link copied to clipboard
val type: GameObject.Type
useHull
Link copied to clipboard
open override var useHull: Boolean = true

Extensions

canUseDoor
Link copied to clipboard
fun GameObject.canUseDoor(): Boolean
isDoor
Link copied to clipboard
fun GameObject.isDoor(): Boolean
isRockfall
Link copied to clipboard
fun GameObject.isRockfall(): Boolean