Skip to main content

EnchantmentEffect

An abstract class in Root.Township, Alta.Enchantments.

Asset for what an enchantment does (for example DamageMultiplier, DurabilitySaveEnchantment), plus the effects played where it hits.

Constructors​

MemberWhat it is
protected EnchantmentEffect()Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets.

Fields​

2 private and internal fields
MemberWhat it is
private PositionRotationEvent onAlignedHitEffectEvent with position and rotation, played by CallHitEffectEvents.
private PositionEvent onHitEffectEvent with position, played by CallHitEffectEvents.

Methods​

MemberWhat it is
void CallHitEffectEvents(Vector3 hitPosition, Quaternion hitAlignment)Fires the hit position and aligned hit events.
IEnchantmentEffectApplication CreateApplication(EnchantmentApplication enchantment)Creates the runtime application of this effect for an enchantment on an item.
protected abstract IEnchantmentEffectApplication CreateNew(EnchantmentApplication enchantment)Makes the effect's own IEnchantmentEffectApplication.

Used in​

Members of other types that take, return or hold a EnchantmentEffect: