Class AreaEffectData
- Namespace
- TDMaker.Unity.Authoring
- Assembly
- TDMaker.Unity.dll
A timed region that attaches an effect to occupants and/or pulses damage or healing, baked into AreaEffectDef. Leave effect empty and enable pulse for a pulse-only region.
public sealed class AreaEffectData
- Inheritance
-
AreaEffectData
- Inherited Members
Constructors
AreaEffectData()
public AreaEffectData()
Fields
duration
Region lifetime (ignored when untilSourceLost is on).
[Min(0.01)]
public float duration
Field Value
effect
Effect attached to each eligible occupant.
public StatusEffectAsset effect
Field Value
enabled
Whether the region is emitted.
public bool enabled
Field Value
followSource
Follows its source while the source exists.
public bool followSource
Field Value
includeTowers
Also affects friendly towers when targeting friendly units (attached effects only).
public bool includeTowers
Field Value
interval
Seconds between occupancy scans.
[Min(0.01)]
public float interval
Field Value
maxTargets
Recipients per scan; zero is unlimited.
[Min(0)]
public int maxTargets
Field Value
pulse
Optional direct damage/healing pulse on every occupant at each scan.
public AreaPulseData pulse
Field Value
radius
Region radius (range ellipse).
[Min(0)]
public float radius
Field Value
removeOnEnd
Removes the attached effects when the region ends.
public bool removeOnEnd
Field Value
targetsEnemies
Targets enemies (otherwise friendly units).
public bool targetsEnemies
Field Value
targetsFlying
Allows flying recipients.
public bool targetsFlying
Field Value
targetsGround
Allows ground recipients.
public bool targetsGround
Field Value
untilSourceLost
Permanent region: no timed expiry, it lasts while its source is alive and is removed (with the effects it attached) when the source dies or is removed. Meant for auras; emitting it without a living source (spell, impact) emits nothing.
[Tooltip("Permanent aura: lasts while the source lives, then removes itself and the effects it attached. Needs a living source (not for spells or impacts).")]
public bool untilSourceLost
Field Value
Properties
IsValid
Whether the data can be baked.
public bool IsValid { get; }
Property Value
Methods
ToDef()
Bakes the region, or null when disabled.
public AreaEffectDef ToDef()