예제 #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()))
 {
 }
예제 #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()))
 {
 }
예제 #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));
        }