Ejemplo n.º 1
0
 /// <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()))
 {
 }
Ejemplo n.º 2
0
 /// <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()))
 {
 }
Ejemplo n.º 3
0
        public HexagonCell GetCellByXYCoord(int argX, int argY)
        {
            var hexCoords = HexagonCoord.GetHexCoords(argX, argY, EdgeLenght, new Point());

            return(GetCellByHexCoord(hexCoords.M, hexCoords.R, hexCoords.L));
        }