Class TowerDef

Namespace
TDMaker.Core.Defs
Assembly
TDMaker.Core.dll

Economy, branching upgrades, and ability slots for a tower.

public sealed class TowerDef
Inheritance
TowerDef
Inherited Members

Constructors

TowerDef(int, float, string[], AbilityDef[])

Creates tower data.

public TowerDef(int cost, float refundRatio = 0.5, string[] upgradeTargets = null, AbilityDef[] abilities = null)

Parameters

cost int
refundRatio float
upgradeTargets string[]
abilities AbilityDef[]

Properties

Abilities

Purchasable abilities with optional generic execution payloads.

public IReadOnlyList<AbilityDef> Abilities { get; }

Property Value

IReadOnlyList<AbilityDef>

Cost

Build cost, also used as the incremental price of upgrading into this template.

public int Cost { get; }

Property Value

int

Priority

Default target priority for this tower.

public TargetPriority Priority { get; }

Property Value

TargetPriority

RefundRatio

Legacy authoring hint; Level.Rules.RefundShare now controls post-start refunds.

public float RefundRatio { get; }

Property Value

float

UpgradeTargets

Allowed immediate upgrade targets; multiple entries represent branches.

public IReadOnlyList<string> UpgradeTargets { get; }

Property Value

IReadOnlyList<string>

Methods

WithPriority(TargetPriority)

Copies tower data and changes only target priority.

public TowerDef WithPriority(TargetPriority priority)

Parameters

priority TargetPriority

Returns

TowerDef