public static IEnumerable <HexPos> GetNeighbours(Vector3 pos, HexCubMap map) { foreach (Vector3 dir in directions) { HexPos hex = map.GetHexPos(dir + pos); if (hex != null && hex.enabled) { yield return(hex); } } }
static public bool isMeristemPosition(HexCubMap map, Vector3 pos) { Tile tile = map.GetHexPos(pos).occupant; if (tile) { return(tile.tileType == TileType.Meristem); } else { return(false); } }