Table of Contents

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

X int

The chunk coordinate on the horizontal axis.

Y int

The chunk coordinate on the vertical axis.

Properties

X

The chunk coordinate on the horizontal axis.

public int X { get; init; }

Property Value

int

Y

The chunk coordinate on the vertical axis.

public int Y { get; init; }

Property Value

int

Methods

Offset(int, int)

Creates a new chunk coordinate offset from the current one.

public ChunkCoord Offset(int dx, int dy)

Parameters

dx int

The horizontal chunk delta.

dy int

The vertical chunk delta.

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.