/// <summary> /// Constructor for XY coords (numbers) /// </summary> public HexagonCell(HexagonalGrid argOwner, int argX = 0, int argY = 0) : this(argOwner, HexagonCoord.GetHexCoords(argX, argY, argOwner.EdgeLenght, new Point())) { }
/// <summary> /// Constructor for XY coords (class) /// </summary> public HexagonCell(HexagonalGrid argOwner, Point argXYcoords) : this(argOwner, HexagonCoord.GetHexCoords(argXYcoords.X, argXYcoords.Y, argOwner.EdgeLenght, new Point())) { }
public HexagonCell GetCellByXYCoord(int argX, int argY) { var hexCoords = HexagonCoord.GetHexCoords(argX, argY, EdgeLenght, new Point()); return(GetCellByHexCoord(hexCoords.M, hexCoords.R, hexCoords.L)); }