Class PrimitiveSprites

Namespace
TDMaker.Unity.View
Assembly
TDMaker.Unity.dll

Procedurally generated sprites (1 world unit across) so samples work with zero imported art. Every shape exists as a flat white silhouette and as an outlined, top-lit grayscale version; both are tinted by the renderer colour. Shapes are described by signed distance functions in unit space (-0.5..0.5, y up).

public static class PrimitiveSprites
Inheritance
PrimitiveSprites
Inherited Members

Properties

Chevron

A chevron pointing right (path entries).

public static Sprite Chevron { get; }

Property Value

Sprite

Circle

A filled anti-aliased circle.

public static Sprite Circle { get; }

Property Value

Sprite

DefaultMaterial

An unlit sprite material that works with the URP 2D renderer and the built-in pipeline.

public static Material DefaultMaterial { get; }

Property Value

Material

Diamond

A filled diamond.

public static Sprite Diamond { get; }

Property Value

Sprite

Flag

A small banner on a pole (rally and move markers). Pivot at the pole's foot.

public static Sprite Flag { get; }

Property Value

Sprite

Pad

A shaded stone build pad.

public static Sprite Pad { get; }

Property Value

Sprite

Pip

A small round pip (tower tier markers).

public static Sprite Pip { get; }

Property Value

Sprite

Ring

A thin ring used for range displays.

public static Sprite Ring { get; }

Property Value

Sprite

Shadow

A soft dark blob drawn under units.

public static Sprite Shadow { get; }

Property Value

Sprite

SoftDisc

A disc with a soft edge used for range fills and impact flashes.

public static Sprite SoftDisc { get; }

Property Value

Sprite

Square

A filled square.

public static Sprite Square { get; }

Property Value

Sprite

Triangle

A filled upward triangle.

public static Sprite Triangle { get; }

Property Value

Sprite

Methods

Get(PrimitiveShape)

Returns the flat silhouette for a primitive shape.

public static Sprite Get(PrimitiveShape shape)

Parameters

shape PrimitiveShape

Returns

Sprite

Get(PrimitiveShape, bool)

Returns the sprite for a primitive shape, optionally in the outlined, shaded style.

public static Sprite Get(PrimitiveShape shape, bool shadedStyle)

Parameters

shape PrimitiveShape
shadedStyle bool

Returns

Sprite

IsDirectional(PrimitiveShape)

Whether a shape has a facing direction (pointing right by default).

public static bool IsDirectional(PrimitiveShape shape)

Parameters

shape PrimitiveShape

Returns

bool