| GridExtensionsCloneStructureTPoint, TNewCell Method (IGridTPoint, FuncTNewCell) |
Creates a grid with a new cell type, and set
the value of each cell to the value return by a
given function.
Namespace:
Gamelogic.Grids2
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax public static IGrid<TPoint, TNewCell> CloneStructure<TPoint, TNewCell>(
this IGrid<TPoint> grid,
Func<TNewCell> generateItem
)
Parameters
- grid
- Type: Gamelogic.Grids2IGridTPoint
The grid to clone. - generateItem
- Type: SystemFuncTNewCell
A function that returns a value. The function
is called for each point in the grid.
Type Parameters
- TPoint
- The point type of the grid.
- TNewCell
- The cell type of the resulting grid.
Return Value
Type:
IGridTPoint,
TNewCellUsage Note
In C#, you can call this method as an instance method on any object of type
IGridTPoint. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
See Also