Enum HexDirection
Represents the 20 possible neighbor directions in a hex-prism grid. Offsets are expressed as axial Q, vertical layer, and axial R.
public enum HexDirection
Fields
Above = 13Vertical offset (0, +1, 0).
AboveQNegative = 17Vertical offset (Q - 1, layer + 1, R unchanged).
AboveQNegativeRPositive = 18Vertical offset (Q - 1, layer + 1, R + 1).
AboveQPositive = 14Vertical offset (Q + 1, layer + 1, R unchanged).
AboveQPositiveRNegative = 15Vertical offset (Q + 1, layer + 1, R - 1).
AboveRNegative = 16Vertical offset (Q unchanged, layer + 1, R - 1).
AboveRPositive = 19Vertical offset (Q unchanged, layer + 1, R + 1).
Below = 6Vertical offset (0, -1, 0).
BelowQNegative = 10Vertical offset (Q - 1, layer - 1, R unchanged).
BelowQNegativeRPositive = 11Vertical offset (Q - 1, layer - 1, R + 1).
BelowQPositive = 7Vertical offset (Q + 1, layer - 1, R unchanged).
BelowQPositiveRNegative = 8Vertical offset (Q + 1, layer - 1, R - 1).
BelowRNegative = 9Vertical offset (Q unchanged, layer - 1, R - 1).
BelowRPositive = 12Vertical offset (Q unchanged, layer - 1, R + 1).
None = -1No hex direction from source.
QNegative = 3Axial offset (Q - 1, R unchanged).
QNegativeRPositive = 4Axial offset (Q - 1, R + 1).
QPositive = 0Axial offset (Q + 1, R unchanged).
QPositiveRNegative = 1Axial offset (Q + 1, R - 1).
RNegative = 2Axial offset (Q unchanged, R - 1).
RPositive = 5Axial offset (Q unchanged, R + 1).