Table of Contents

Class FlatHexShapeInfo<TCell>

Namespace
Gamelogic.Grids
Assembly
Assembly-CSharp.dll

Provides the implementation for AbstractShapeInfo to be used with FlatHexGrid.

public class FlatHexShapeInfo<TCell> : AbstractShapeInfo<FlatHexShapeInfo<TCell>, FlatHexGrid<TCell>, FlatHexPoint, FlatHexPoint, FlatHexOp<TCell>>, IShapeInfo<FlatHexShapeInfo<TCell>, FlatHexGrid<TCell>, FlatHexPoint, FlatHexPoint, FlatHexOp<TCell>>

Type Parameters

TCell
Inheritance
FlatHexShapeInfo<TCell>
Implements
Inherited Members
Extension Methods

Constructors

FlatHexShapeInfo(ShapeStorageInfo<FlatHexPoint>)

public FlatHexShapeInfo(ShapeStorageInfo<FlatHexPoint> info)

Parameters

info ShapeStorageInfo<FlatHexPoint>

Methods

ArrayPointFromGridPoint(FlatHexPoint)

protected override ArrayPoint ArrayPointFromGridPoint(FlatHexPoint point)

Parameters

point FlatHexPoint

Returns

ArrayPoint

EndGroup(FlatHexOp<TCell>)

Only call this method from within a FlatHexOp method (usually, in client code, this will be in an extension).

Since 1.1

public FlatHexShapeInfo<TCell> EndGroup(FlatHexOp<TCell> op)

Parameters

op FlatHexOp<TCell>

The operator on which this shape is defined.

Returns

FlatHexShapeInfo<TCell>

GridPointFromArrayPoint(ArrayPoint)

protected override FlatHexPoint GridPointFromArrayPoint(ArrayPoint point)

Parameters

point ArrayPoint

Returns

FlatHexPoint

MakeOp(ShapeStorageInfo<FlatHexPoint>, Func<ShapeStorageInfo<FlatHexPoint>, ShapeStorageInfo<FlatHexPoint>, ShapeStorageInfo<FlatHexPoint>>)

protected override FlatHexOp<TCell> MakeOp(ShapeStorageInfo<FlatHexPoint> shapeInfo, Func<ShapeStorageInfo<FlatHexPoint>, ShapeStorageInfo<FlatHexPoint>, ShapeStorageInfo<FlatHexPoint>> combineInfo)

Parameters

shapeInfo ShapeStorageInfo<FlatHexPoint>
combineInfo Func<ShapeStorageInfo<FlatHexPoint>, ShapeStorageInfo<FlatHexPoint>, ShapeStorageInfo<FlatHexPoint>>

Returns

FlatHexOp<TCell>

MakePoint(int, int)

protected override FlatHexPoint MakePoint(int x, int y)

Parameters

x int
y int

Returns

FlatHexPoint

MakeShape(int, int, Func<FlatHexPoint, bool>, FlatHexPoint)

protected override FlatHexGrid<TCell> MakeShape(int x, int y, Func<FlatHexPoint, bool> isInside, FlatHexPoint offset)

Parameters

x int
y int
isInside Func<FlatHexPoint, bool>
offset FlatHexPoint

Returns

FlatHexGrid<TCell>

MakeShapeInfo(ShapeStorageInfo<FlatHexPoint>)

protected override FlatHexShapeInfo<TCell> MakeShapeInfo(ShapeStorageInfo<FlatHexPoint> shapeStorageInfo)

Parameters

shapeStorageInfo ShapeStorageInfo<FlatHexPoint>

Returns

FlatHexShapeInfo<TCell>