Class PathData

Namespace
TDMaker.Unity.Authoring
Assembly
TDMaker.Unity.dll

A path authored as a center line; parallel sub-lanes are generated from it.

public sealed class PathData
Inheritance
PathData
Inherited Members

Constructors

PathData()

public PathData()

Fields

DefaultWaveCallDistance

Distance ahead of the entry (along the road) where the wave-call button appears by default.

public const float DefaultWaveCallDistance = 1.2

Field Value

float

airRoute

Presentation only: drawn as a dashed flight line instead of a road (for routes used by flying units). The simulation treats it like any other path.

public bool airRoute

Field Value

bool

centerLine

Center-line nodes in world space, from entry to exit.

public List<Vector2> centerLine

Field Value

List<Vector2>

entryNode

Node at which enemies spawn.

[Min(0)]
public int entryNode

Field Value

int

exitNode

Node at which enemies leak; negative means the last node.

public int exitNode

Field Value

int

laneCount

Number of parallel sub-lanes.

[Min(1)]
public int laneCount

Field Value

int

laneSpacing

Distance between neighbouring sub-lanes.

[Min(0)]
public float laneSpacing

Field Value

float

name

Optional label.

public string name

Field Value

string

nodeLaneSpacing

Optional per-node lane spacing, index-aligned with centerLine; missing or non-positive uses laneSpacing.

public List<float> nodeLaneSpacing

Field Value

List<float>

overrideWaveCall

Presentation only: place the wave-call button at waveCallOffset from the entry instead of the default spot.

[Tooltip("Presentation only: place the wave-call button at Wave Call Offset from the entry instead of just ahead of it.")]
public bool overrideWaveCall

Field Value

bool

waveCallOffset

Wave-call button position relative to the entry node (world units), used when overrideWaveCall is set.

public Vector2 waveCallOffset

Field Value

Vector2

Methods

BuildLanes()

Generates the sub-lane node arrays.

public Vector2[][] BuildLanes()

Returns

Vector2[][]

Clone()

Creates a deep copy.

public PathData Clone()

Returns

PathData

ToDef()

Bakes the core path definition.

public PathDef ToDef()

Returns

PathDef

WaveCallPosition(Vector2, Vector2)

World position of this path's wave-call button: entry + waveCallOffset when overridden, else DefaultWaveCallDistance ahead along direction (the road direction at the entry).

public Vector2 WaveCallPosition(Vector2 entry, Vector2 direction)

Parameters

entry Vector2
direction Vector2

Returns

Vector2