Class FlatHexMap
The default Map to be used with a FlatHexGrid.
[Version(1, 0, 0)]
public class FlatHexMap : AbstractMap<FlatHexPoint>, IMap<FlatHexPoint>, IGridToWorldMap<FlatHexPoint>
- Inheritance
-
FlatHexMap
- Implements
- Inherited Members
- Extension Methods
Constructors
FlatHexMap(Vector2)
Calculates the FlatHexMap
public FlatHexMap(Vector2 cellDimensions)
Parameters
cellDimensions
Vector2The vertical and horizontal distance between cells (and thus, in fact a bit smaller in width than the actual cell).
Methods
GridToWorld(FlatHexPoint)
This method maps a grid point to a world point.
public override Vector2 GridToWorld(FlatHexPoint point)
Parameters
point
FlatHexPoint
Returns
RawWorldToGrid(Vector2)
This method maps a world point to a grid point, assuming that the anchor point is centered in the cell.This will allow the index accessors[] to give correct results for any anchoring.
public override FlatHexPoint RawWorldToGrid(Vector2 point)
Parameters
point
Vector2