LineCell
namespace Griff.Scenes;
public struct LineCellOne cell of a line laid on a grid (see LineTool and LineDrag): its column and row (counted as a tilemap’s are, row 0 at the top), the way the line leaves it and the way it came in (x right, y up, as a grid mover steps and a Conveyor carries), and whether it can go there.
Properties
Section titled “Properties”public ValueTuple<int, int> Cell { get; }Its column and row.
public bool Fits { get; init; }public ValueTuple<int, int> In { get; }The way the line comes into it: the same as Way but at a corner. The first cell’s is its own way.
public int InX { get; init; }public int InY { get; init; }IsCorner
Section titled “IsCorner”public bool IsCorner { get; }True where the line turns: it comes in one way and leaves another.
public LineJoin Join { get; init; }How it joins a line already there (see Join): none for a line laid on its own.
OnOtherLine
Section titled “OnOtherLine”public bool OnOtherLine { get; }True for a cell of a line already there that this one merges into or splits off: it isn’t laid with the line (a split’s cell becomes a splitter, keeping its way).
public ValueTuple<int, int> Way { get; }The way the line leaves it: (1, 0) right, (0, 1) up, (-1, 0) left, (0, -1) down.
public int WayX { get; init; }public int WayY { get; init; }public int X { get; init; }public int Y { get; init; }Methods
Section titled “Methods”Deconstruct
Section titled “Deconstruct”public void Deconstruct(out int X, out int Y, out int WayX, out int WayY, out int InX, out int InY, out bool Fits)Equals
Section titled “Equals”public override bool Equals(object obj)Equals
Section titled “Equals”public bool Equals(LineCell other)GetHashCode
Section titled “GetHashCode”public override int GetHashCode()ToConveyor
Section titled “ToConveyor”public ConveyorCell ToConveyor(ConveyorCellKind kind = ConveyorCellKind.Belt)The cell as a Conveyor’s, carrying the way the line runs.
ToString
Section titled “ToString”public override string ToString()