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