Class RangedAttackData

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

Serializable ranged attack channel.

public sealed class RangedAttackData
Inheritance
RangedAttackData
Inherited Members

Constructors

RangedAttackData()

public RangedAttackData()

Fields

cooldown

Seconds between attacks.

[Min(0.01)]
public float cooldown

Field Value

float

damage

Damage per hit.

public DamageData damage

Field Value

DamageData

minimumRange

Inner exclusion radius.

[Min(0)]
public float minimumRange

Field Value

float

projectile

Projectile; null means an instant hit.

public ProjectileAsset projectile

Field Value

ProjectileAsset

range

Maximum range (horizontal semi-axis); the vertical semi-axis is range × the level's range Y scale.

[Min(0)]
public float range

Field Value

float

targetsFlying

Whether flying enemies can be targeted.

public bool targetsFlying

Field Value

bool

targetsGround

Whether ground enemies can be targeted.

public bool targetsGround

Field Value

bool

Methods

ToDef()

Bakes the attack definition.

public RangedAttackDef ToDef()

Returns

RangedAttackDef

ToDef(float, float)

Bakes with an added experience rate and a damage multiplier.

public RangedAttackDef ToDef(float extraExperienceRate, float damageScale)

Parameters

extraExperienceRate float
damageScale float

Returns

RangedAttackDef