EnchantmentTriggerApplication<T>
An abstract class in Root.Township, Alta.Enchantments.
Runtime part of an EnchantmentTrigger on one item: hooks game events when applied and fires Invoked when the trigger condition is met.
- Listed in Crafting and making
- Inherits or implements
IEnchantmentTriggerApplication - Derived types
QuickDrawApplication
Constructors
| Member | What it is |
|---|---|
EnchantmentTriggerApplication(EnchantmentApplication enchantment, T settings) | Creates an EnchantmentTriggerApplication from enchantment and settings. |
Fields
2 private and internal fields
Properties
| Member | What it is |
|---|---|
EnchantmentApplication EnchantmentApp { get; private set; } | The enchantment this trigger belongs to. |
T Settings { get; private set; } | The trigger asset. |
1 private and internal property
| Member | What it is |
|---|---|
private EnchantmentTrigger Alta.Enchantments.IEnchantmentTriggerApplication.Settings { get; } | The settings as a plain EnchantmentTrigger, for the interface. |
Events
| Member | What it is |
|---|---|
event Action<object> Invoked | Fired when the trigger goes off. |
Methods
| Member | What it is |
|---|---|
void Apply() | Hooks the trigger, once. |
void CallEvents(EnchantmentTrigger.EffectType effectType) | Plays the trigger's effect events (charged, executed, cancelled). The server also sends them to clients. |
void Remove() | Unhooks the trigger, once. |
virtual void SendMessage(Stream stream) | Writes or reads the effect type. Clients play the events on reading. |
protected abstract void ApplyInternal() | Subclass hook for Apply. |
protected void Invoke(object data) | Fires Invoked with data such as the hit. |
protected abstract void RemoveInternal() | Subclass hook for Remove. |
1 private and internal method
| Member | What it is |
|---|---|
private Transform GetTransformToCallAt(NetworkEntity entity) | Returns the entity's transform. Not called in this file. |