Class CompanionDef

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

Persistent owner-bound slots, attached through EntityTemplate.WithCustomData.

public sealed class CompanionDef
Inheritance
CompanionDef
Inherited Members

Constructors

CompanionDef(string, int, CompanionMode, float, float, float, float, float, bool, bool, bool, float, PointRuleDef, float)

Creates companion slots for a hero or tower.

public CompanionDef(string templateId, int slots, CompanionMode mode = CompanionMode.GroundEscort, float refillDelay = 1, float formationRadius = 0.5, float followStartDistance = 2, float followStopDistance = 0.75, float acceleration = 8, bool waitOnOwnerDeath = true, bool removeWithOwner = true, bool reconnectOnReturn = true, float initialDelay = 0, PointRuleDef pointRule = null, float rallyRadius = 5)

Parameters

templateId string
slots int
mode CompanionMode
refillDelay float
formationRadius float
followStartDistance float
followStopDistance float
acceleration float
waitOnOwnerDeath bool
removeWithOwner bool
reconnectOnReturn bool
initialDelay float
pointRule PointRuleDef
rallyRadius float

Properties

Acceleration

Follower acceleration and braking rate in world units per squared second.

public float Acceleration { get; }

Property Value

float

FollowStartDistance

Distance at which a resting follower begins approaching.

public float FollowStartDistance { get; }

Property Value

float

FollowStopDistance

Distance at which an approaching follower stops.

public float FollowStopDistance { get; }

Property Value

float

FormationRadius

Ground escort formation radius around the most recent owner movement/rally order.

public float FormationRadius { get; }

Property Value

float

InitialDelay

Delay before initial population.

public float InitialDelay { get; }

Property Value

float

Mode

Ground escort or flying follower.

public CompanionMode Mode { get; }

Property Value

CompanionMode

PointRule

Ground spawn/reposition terrain validation.

public PointRuleDef PointRule { get; }

Property Value

PointRuleDef

RallyRadius

Ground-escort rally radius for a tower without barracks. Barracks owners retain their existing rally radius.

public float RallyRadius { get; }

Property Value

float

ReconnectOnReturn

Reconnect waiting children on owner return; false retires them.

public bool ReconnectOnReturn { get; }

Property Value

bool

RefillDelay

Delay measured from child death/removal, not owner animation completion.

public float RefillDelay { get; }

Property Value

float

RemoveWithOwner

Retire children on owner removal; false detaches them as independent units.

public bool RemoveWithOwner { get; }

Property Value

bool

Slots

Maximum living or pending children.

public int Slots { get; }

Property Value

int

TemplateId

Child template identifier.

public string TemplateId { get; }

Property Value

string

WaitOnOwnerDeath

Return to the owner and suspend attacks/interception while the owner is dead.

public bool WaitOnOwnerDeath { get; }

Property Value

bool