Esempio n. 1
0
        public IGrid <TNewCell, PointyHexPoint> MakeVertexGrid <TNewCell>()
        {
            var vertices = this.SelectMany(x => x.GetVertices());
            var storage  = PointyHexGrid <TNewCell> .CalculateStorage(vertices);

            var offset = PointyHexGrid <TNewCell> .GridPointFromArrayPoint(storage.offset);

            return(new PointyHexGrid <TNewCell>(storage.dimensions.X, storage.dimensions.Y, x => IsInsideVertexGrid(x + offset), offset));
        }
Esempio n. 2
0
 public static PointyHexPoint GridPointFromArrayPoint(ArrayPoint point)
 {
     return(PointyHexGrid <TCell> .GridPointFromArrayPoint(point));
 }
Esempio n. 3
0
 protected override PointyHexPoint GridPointFromArrayPoint(ArrayPoint point)
 {
     return(PointyHexGrid <TCell> .GridPointFromArrayPoint(point));
 }