Skip to main content

QuickDrawTrigger

A class in Root.Township, Alta.Enchantments.

Enchantment trigger that charges when the item is taken out of a dock and goes off on a good hit within a time limit.

Constructors​

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

Fields​

5 private and internal fields
MemberWhat it is
private float cooldownTimeSeconds after a proc before the trigger can charge again.
private bool isOneHitIf true, the charge ends after the first hit that procs.
private float minimumEffectivenessA hit must be more effective than this (0 to 1) to proc.
private float timeToHitSeconds after drawing the tool that a hit still counts. The charge is cancelled after that.
private PickupDockSettings[] validDocksDock types the tool must be drawn from. Empty means any dock.

Properties​

MemberWhat it is
float CooldownTime { get; }Seconds after going off before it can charge again.
bool IsOneHit { get; }If true it uncharges after the first hit.
float MinimumEffectiveness { get; }Hits must be more effective than this.
float TimeToHit { get; }Seconds after undocking to land the hit before the charge is cancelled.
PickupDockSettings[] ValidDocks { get; }Docks that charge it. Empty means any.

Methods​

MemberWhat it is
protected override IEnchantmentTriggerApplication CreateNew(EnchantmentApplication enchantment)Creates a QuickDrawApplication.

Used in​

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