Table of Contents

Method AnchorPivotHorizontal

Namespace
Gamelogic.Grids2
Assembly
Gamelogic.Grids2.dll

AnchorPivotHorizontal(IMap<Vector3, GridPoint3>, IExplicitShape<GridPoint3>, Func<GridPoint3, Vector3>, HorizontalAlignment)

It returns a Map that translate in such a way that it is aligned horizontally according to the given alignment. This is different to the normal AlignGrid methods, since this one take in account the pivot used in the cell.

public static IMap<Vector3, GridPoint3> AnchorPivotHorizontal(this IMap<Vector3, GridPoint3> map, IExplicitShape<GridPoint3> shape, Func<GridPoint3, Vector3> cellSize, HorizontalAlignment alignment)

Parameters

map IMap<Vector3, GridPoint3>

Base map where you apply this call.

shape IExplicitShape<GridPoint3>

Shape used in the map.

cellSize Func<GridPoint3, Vector3>

This function is used to calculate the size of a cell.

alignment HorizontalAlignment

Type of alignment to apply.

Returns

IMap<Vector3, GridPoint3>