GameArea

interface GameArea<T : Tile, B : Block<T>> : Scrollable3D

A GameArea represents the 3D space in which the entities of a game take place. The space is composed of Blocks which are just voxels (like in Minecraft) which have 6 sides (all optional), and a content Tile within the voxel itself (optional as well).

Types

Companion
Link copied to clipboard
common
object Companion

Functions

asInternalGameArea
Link copied to clipboard
common
abstract fun asInternalGameArea(): InternalGameArea<T, B>
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
fetchBlockAt
Link copied to clipboard
common
abstract fun fetchBlockAt(position: Position3D): Maybe<B>
Returns the Block at the given position (if any).
fetchBlockAtOrNull
Link copied to clipboard
common
abstract fun fetchBlockAtOrNull(position: Position3D): B?
Returns the Block at the given position or null if no Block is present.
hasBlockAt
Link copied to clipboard
common
abstract fun hasBlockAt(position: Position3D): Boolean
Tells whether there is an actual Block at the given position.
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
scrollBackwardBy
Link copied to clipboard
common
abstract fun scrollBackwardBy(y: Int): Position3D
Scrolls this Scrollable3D with depth units backward (depth axis).
scrollDownBy
Link copied to clipboard
common
abstract fun scrollDownBy(z: Int): Position3D
Scrolls this Scrollable3D with height units down (height axis).
scrollForwardBy
Link copied to clipboard
common
abstract fun scrollForwardBy(y: Int): Position3D
Scrolls this Scrollable3D by depth units forward (depth axis).
scrollLeftBy
Link copied to clipboard
common
abstract fun scrollLeftBy(x: Int): Position3D
Scrolls this Scrollable3D with width units to the left (width axis).
scrollOneBackward
Link copied to clipboard
common
abstract fun scrollOneBackward(): Position3D
Scrolls this Scrollable3D with one unit backward (depth axis, towards the observer).
scrollOneDown
Link copied to clipboard
common
abstract fun scrollOneDown(): Position3D
Scrolls this Scrollable3D with one unit down (height axis).
scrollOneForward
Link copied to clipboard
common
abstract fun scrollOneForward(): Position3D
Scrolls this Scrollable3D with one unit forward (depth axis, away from the observer).
scrollOneLeft
Link copied to clipboard
common
abstract fun scrollOneLeft(): Position3D
Scrolls this Scrollable3D with one unit to the left (width axis).
scrollOneRight
Link copied to clipboard
common
abstract fun scrollOneRight(): Position3D
Scrolls this Scrollable3D with one unit to the right (width axis).
scrollOneUp
Link copied to clipboard
common
abstract fun scrollOneUp(): Position3D
Scrolls this Scrollable3D with one unit up (height axis).
scrollRightBy
Link copied to clipboard
common
abstract fun scrollRightBy(x: Int): Position3D
Scrolls this Scrollable3D by width units to the right (width axis).
scrollTo
Link copied to clipboard
common
abstract fun scrollTo(position3D: Position3D)
Scrolls this Scrollable3D to the provided position
scrollUpBy
Link copied to clipboard
common
abstract fun scrollUpBy(z: Int): Position3D
Scrolls this Scrollable3D by height units up (height axis).
setBlockAt
Link copied to clipboard
common
abstract fun setBlockAt(position: Position3D, block: B)
Sets the Block at the given position.
toString
Link copied to clipboard
common
open fun toString(): String

Properties

actualSize
Link copied to clipboard
common
abstract val actualSize: Size3D
Returns the Size3D of the actual space this Scrollable3D can scroll through.
blocks
Link copied to clipboard
common
abstract val blocks: Map<Position3D, B>
Contains all the currently present Blocks in this GameArea.
visibleOffset
Link copied to clipboard
common
abstract val visibleOffset: Position3D
Returns the offset where the visible part of this Scrollable3D starts.
visibleOffsetValue
Link copied to clipboard
common
abstract val visibleOffsetValue: ObservableValue<Position3D>
visibleSize
Link copied to clipboard
common
abstract val visibleSize: Size3D
Returns the size of the visible part of this Scrollable3D.

Inheritors

InternalGameArea
Link copied to clipboard

Sources

(source)
Link copied to clipboard