Interactable

interface Interactable : Targetable, Validatable, Viewable, Drawable

Functions

basePoint
Link copied to clipboard
abstract fun basePoint(): Point?

Finds the base point of the entity within the game screen.

bounds
Link copied to clipboard
abstract fun bounds(arr: IntArray?)

Sets the boundaries of this entity utilizing an array.

centerPoint
Link copied to clipboard
abstract fun centerPoint(): Point?

Finds the centroid of the entity within the game screen.

click
Link copied to clipboard
abstract fun click(): Boolean

Clicks the target and compensates for movement. Does not check intent or expected result (mouse cross-hair).

abstract fun click(f: (MenuCommand) -> Boolean): Boolean
abstract fun click(action: String?): Boolean
abstract fun click(action: String?, option: String?): Boolean

Clicks the target and compensates for movement. This method expects (and requires) that the given action is up-text (menu index 0). This method can be used when precision clicking is required, and the option is guaranteed to be up-text. WARNING: this method DOES NOT check intent or expected result (mouse cross-hair). WARNING: The return status does not guarantee the correct action was acted upon.

abstract fun click(c: Filter<MenuCommand>, useMenu: Boolean): Boolean

Clicks the target. This method expects (and requires) that the given action is up-text (menu index 0). This method can be used when precision clicking is required, and the option is guaranteed to be up-text. WARNING: this method DOES NOT check intent or expected result (mouse cross-hair). WARNING: The return status does not guarantee the correct action was acted upon.

contains
Link copied to clipboard
abstract operator fun contains(point: Point?): Boolean

Whether or not the entity contains the point.

draw
Link copied to clipboard
abstract fun draw(g: Graphics)

Renders the entity within the viewport at alpha = 255

interact
Link copied to clipboard
abstract fun interact(f: (MenuCommand) -> Boolean): Boolean
abstract fun interact(f: (MenuCommand) -> Boolean, useMenu: Boolean): Boolean
abstract fun interact(action: String?): Boolean
abstract fun interact(f: Filter<MenuCommand>): Boolean
abstract fun interact(f: Filter<MenuCommand>, useMenu: Boolean): Boolean
abstract fun interact(action: String?, option: String?, useMenu: Boolean): Boolean

Interacts with the target and compensates for movement. This method will interact (and choose it) when it finds the desired action. This method accomplishes it via left or right click.

abstract fun interact(action: String?, useMenu: Boolean): Boolean
abstract fun interact(action: String?, option: String?): Boolean

Interacts with the target and compensates for movement. This method will interact (and choose it) when it finds the desired action. This method accomplishes it via left or right click (as defined). When auto is set to false, the method forcibly right clicks before searching for menu options. This is useful when precision clicking is required and the option is always in the menu (not up-text).

inViewport
Link copied to clipboard
abstract fun inViewport(): Boolean
abstract fun inViewport(checkIfObstructed: Boolean): Boolean

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

nextPoint
Link copied to clipboard
abstract fun nextPoint(): Point

The next game screen point of the entity.

triangles
Link copied to clipboard
abstract fun triangles(): Array<Polygon>

The translated model triangles.

valid
Link copied to clipboard
abstract fun valid(): Boolean

Inheritors

InteractableEntity
Link copied to clipboard
GroundItem
Link copied to clipboard
Interactive
Link copied to clipboard