HexMapLibrary
Static Public Member Functions | List of all members
Wunderwunsch.HexMapLibrary.HexMapBuilder Class Reference

Contains methods to create differently shaped map layouts. Can be used to easily initialize a HexMap instance More...

Static Public Member Functions

static Dictionary< Vector3Int, int > CreateHexagonalShapedMap (int radius)
 returns indexed positions which form a flat-top hexagonal shaped map with the specified radius More...
 
static Dictionary< Vector3Int, int > CreateRectangularShapedMap (Vector2Int mapSize)
 returns indexed positions which form a rectangular shaped map with the specified width(x) and length(y). Most common map shape for periodic maps
More...
 
static Dictionary< Vector3Int, int > CreateRectangularShapedMapOddRowsOneShorter (Vector2Int mapSize)
 returns indexed positions which form a rectangular shaped map with the specified width(x) and length(y). Odd-numbered rows are one tile shorter Best used for non-periodic maps where symmetry is important More...
 
static Dictionary< Vector3Int, int > CreateTriangularShapedMap (int sideLength)
 returns indexed positions which form a equilateral triangular map with the specified side length More...
 

Detailed Description

Contains methods to create differently shaped map layouts. Can be used to easily initialize a HexMap instance

TODO add detailed description here

Member Function Documentation

◆ CreateHexagonalShapedMap()

static Dictionary<Vector3Int, int> Wunderwunsch.HexMapLibrary.HexMapBuilder.CreateHexagonalShapedMap ( int  radius)
static

returns indexed positions which form a flat-top hexagonal shaped map with the specified radius

HexagonalMap.png
Hexagonal map with radius 4

◆ CreateRectangularShapedMap()

static Dictionary<Vector3Int, int> Wunderwunsch.HexMapLibrary.HexMapBuilder.CreateRectangularShapedMap ( Vector2Int  mapSize)
static

returns indexed positions which form a rectangular shaped map with the specified width(x) and length(y). Most common map shape for periodic maps

RectangularMap.png
Rectangular map. Mapsize: x = 9 and y = 9

◆ CreateRectangularShapedMapOddRowsOneShorter()

static Dictionary<Vector3Int, int> Wunderwunsch.HexMapLibrary.HexMapBuilder.CreateRectangularShapedMapOddRowsOneShorter ( Vector2Int  mapSize)
static

returns indexed positions which form a rectangular shaped map with the specified width(x) and length(y). Odd-numbered rows are one tile shorter Best used for non-periodic maps where symmetry is important

RectangularMapOddRow1Shorter.png
Rectangular map with odd rows being one tile shorter. Mapsize: x = 9 and y = 9

◆ CreateTriangularShapedMap()

static Dictionary<Vector3Int, int> Wunderwunsch.HexMapLibrary.HexMapBuilder.CreateTriangularShapedMap ( int  sideLength)
static

returns indexed positions which form a equilateral triangular map with the specified side length

TriangularMap.png
Triangular map with with sidelength of 9