Struct ChunkCoord
- Namespace
- TileWorld.Engine.World.Coordinates
- Assembly
- TileWorld.Engine.dll
Represents chunk-space coordinates.
public readonly record struct ChunkCoord : IEquatable<ChunkCoord>
- Implements
- Inherited Members
Constructors
ChunkCoord(int, int)
Represents chunk-space coordinates.
public ChunkCoord(int X, int Y)
Parameters
Properties
X
The chunk coordinate on the horizontal axis.
public int X { get; init; }
Property Value
Y
The chunk coordinate on the vertical axis.
public int Y { get; init; }
Property Value
Methods
Offset(int, int)
Creates a new chunk coordinate offset from the current one.
public ChunkCoord Offset(int dx, int dy)
Parameters
Returns
- ChunkCoord
The offset chunk coordinate.
ToString()
Returns a debugger-friendly textual representation of the coordinate.
public override string ToString()
Returns
- string
A formatted chunk coordinate string.