Table of Contents

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

X int

The tile coordinate on the horizontal axis.

Y int

The tile coordinate on the vertical axis.

Properties

X

The tile coordinate on the horizontal axis.

public int X { get; init; }

Property Value

int

Y

The tile coordinate on the vertical axis.

public int Y { get; init; }

Property Value

int

Methods

Offset(int, int)

Creates a new world-tile coordinate offset from the current one.

public WorldTileCoord Offset(int dx, int dy)

Parameters

dx int

The horizontal tile delta.

dy int

The vertical tile delta.

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.