Class TowerDef
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
costintrefundRatiofloatupgradeTargetsstring[]abilitiesAbilityDef[]
Properties
Abilities
Purchasable abilities with optional generic execution payloads.
public IReadOnlyList<AbilityDef> Abilities { get; }
Property Value
Cost
Build cost, also used as the incremental price of upgrading into this template.
public int Cost { get; }
Property Value
Priority
Default target priority for this tower.
public TargetPriority Priority { get; }
Property Value
RefundRatio
Legacy authoring hint; Level.Rules.RefundShare now controls post-start refunds.
public float RefundRatio { get; }
Property Value
UpgradeTargets
Allowed immediate upgrade targets; multiple entries represent branches.
public IReadOnlyList<string> UpgradeTargets { get; }
Property Value
Methods
WithPriority(TargetPriority)
Copies tower data and changes only target priority.
public TowerDef WithPriority(TargetPriority priority)
Parameters
priorityTargetPriority