Class StatusEffectAsset
- Namespace
- TDMaker.Unity.Authoring
- Assembly
- TDMaker.Unity.dll
An attached status effect (slow, stun, armor shift, damage over time ...). Bakes to StatusEffectDef. Reference it from attack damage (effects), area effects, abilities or spells.
[CreateAssetMenu(menuName = "2D Tower Defense Maker/Status Effect", fileName = "StatusEffect", order = 15)]
public sealed class StatusEffectAsset : ScriptableObject
- Inheritance
-
ObjectScriptableObjectStatusEffectAsset
- Inherited Members
-
ScriptableObject.SetDirty()ScriptableObject.CreateInstance<T>()Object.GetEntityId()Object.GetInstanceID()Object.GetHashCode()Object.InstantiateAsync<T>(T)Object.InstantiateAsync<T>(T, Transform)Object.InstantiateAsync<T>(T, Vector3, Quaternion)Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion)Object.Instantiate(Object, Vector3, Quaternion, Transform)Object.Instantiate(Object)Object.Instantiate(Object, Scene)Object.Instantiate<T>(T, InstantiateParameters)Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)Object.Instantiate(Object, Transform)Object.Instantiate<T>(T)Object.Instantiate<T>(T, Vector3, Quaternion)Object.Instantiate<T>(T, Vector3, Quaternion, Transform)Object.Instantiate<T>(T, Transform)Object.Destroy(Object)Object.DestroyImmediate(Object)Object.DontDestroyOnLoad(Object)Object.DestroyObject(Object)Object.FindObjectsOfType<T>()Object.FindObjectsByType<T>(FindObjectsSortMode)Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)Object.FindObjectOfType<T>()Object.FindFirstObjectByType<T>()Object.FindAnyObjectByType<T>()Object.FindFirstObjectByType<T>(FindObjectsInactive)Object.FindAnyObjectByType<T>(FindObjectsInactive)Object.FindObjectsByType<T>()Object.FindObjectsByType<T>(FindObjectsInactive)Object.ToString()Object.nameObject.hideFlags
Constructors
StatusEffectAsset()
public StatusEffectAsset()
Fields
displayName
Name shown in UI; blank uses the asset name.
public string displayName
Field Value
duration
Lifetime in game seconds.
[Min(0.01)]
public float duration
Field Value
effectId
Definition id used for duplicate checks; blank uses the asset name.
public string effectId
Field Value
family
Optional family used by immunities and suppression (for example "slow" or "poison").
public string family
Field Value
forbiddenFamilies
Effect families that cannot be attached while this effect is present.
public List<string> forbiddenFamilies
Field Value
forbiddenIds
Effect ids that cannot be attached while this effect is present.
public List<string> forbiddenIds
Field Value
healing
Optional healing over time (independent of damage over time).
public PeriodicHealingData healing
Field Value
icon
Optional icon drawn above affected units; a coloured pip is used when empty.
public Sprite icon
Field Value
- Sprite
modifier
Reversible stat changes while attached.
[Header("Payload")]
public StatModifierData modifier
Field Value
periodic
Optional damage over time.
public PeriodicDamageData periodic
Field Value
rank
Relative strength; a higher rank can replace a lower rank of the same id.
[Min(0)]
public int rank
Field Value
refreshEqualRank
Re-applying at equal rank refreshes the lifetime (without re-applying modifiers).
public bool refreshEqualRank
Field Value
rejectedTags
No such eligibility bit may be present on the target (bit mask).
public int rejectedTags
Field Value
removeForbidden
Also removes existing forbidden effects when this one attaches.
public bool removeForbidden
Field Value
replaceLowerRank
Replaces lower-ranked instances of the same id.
public bool replaceLowerRank
Field Value
requiredTags
All these eligibility bits must be present on the target (bit mask).
[Header("Eligibility")]
public int requiredTags
Field Value
shield
Optional damage-absorbing shield, stored separately for each attachment.
public ShieldData shield
Field Value
stackEqualRank
Allows separate instances at equal rank.
[Header("Stacking")]
public bool stackEqualRank
Field Value
tint
Body tint applied to affected units.
[Header("View")]
public Color tint
Field Value
- Color
tintStrength
Strength of the body tint (0 disables tinting).
[Range(0, 1)]
public float tintStrength
Field Value
Properties
DisplayName
The resolved display name.
public string DisplayName { get; }
Property Value
EffectId
The resolved effect id.
public string EffectId { get; }
Property Value
Methods
ToDef()
Bakes the immutable definition. Inside a level bake the same instance is reused for this asset.
public StatusEffectDef ToDef()