Table of Contents

Struct TileVisualDef

Namespace
TileWorld.Engine.Render
Assembly
TileWorld.Engine.dll

Describes the visual data required to render a tile type.

public readonly record struct TileVisualDef : IEquatable<TileVisualDef>
Implements
Inherited Members

Constructors

TileVisualDef(string, RectI, ColorRgba32, bool)

Describes the visual data required to render a tile type.

public TileVisualDef(string TextureKey, RectI SourceRect, ColorRgba32 Tint, bool UseVariantHorizontalStrip)

Parameters

TextureKey string

The host-defined texture identifier to sample from.

SourceRect RectI

The source rectangle for the base tile sprite.

Tint ColorRgba32

The multiplicative tint color applied during drawing.

UseVariantHorizontalStrip bool

Whether autotile variants advance horizontally across the source texture.

Properties

Default

Gets the default white-pixel visual used when no explicit tile visuals are provided.

public static TileVisualDef Default { get; }

Property Value

TileVisualDef

SourceRect

The source rectangle for the base tile sprite.

public RectI SourceRect { get; init; }

Property Value

RectI

TextureKey

The host-defined texture identifier to sample from.

public string TextureKey { get; init; }

Property Value

string

Tint

The multiplicative tint color applied during drawing.

public ColorRgba32 Tint { get; init; }

Property Value

ColorRgba32

UseVariantHorizontalStrip

Whether autotile variants advance horizontally across the source texture.

public bool UseVariantHorizontalStrip { get; init; }

Property Value

bool