RiverCoordinate

class RiverCoordinate(position: Vector2, bottomRightOrLeft: RiverGenerator.RiverCoordinate.BottomRightOrLeft)

Describes a Vertex on our hexagonal grid via a neighboring hex and clock direction, normalized such that always the north-most hex and one of the two clock directions 5 / 7 o'clock are used.

Constructors

RiverCoordinate
Link copied to clipboard
fun RiverCoordinate(position: Vector2, bottomRightOrLeft: RiverGenerator.RiverCoordinate.BottomRightOrLeft)

Types

BottomRightOrLeft
Link copied to clipboard

Functions

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
getAdjacentPositions
Link copied to clipboard
fun getAdjacentPositions(tileMap: TileMap): Sequence<RiverGenerator.RiverCoordinate>

Lists the three neighboring vertices which have their anchor hex on the map (yes some positions on the map's outer border will be included, some not)

getAdjacentTiles
Link copied to clipboard
fun getAdjacentTiles(tileMap: TileMap): Sequence<TileInfo>

Lists the three neighboring hexes to this vertex which are on the map

hashCode
Link copied to clipboard
open fun hashCode(): Int
toString
Link copied to clipboard
open fun toString(): String

Properties

bottomRightOrLeft
Link copied to clipboard
position
Link copied to clipboard
val position: Vector2

Sources

jvm source
Link copied to clipboard