Skip to main content

ArrowFlightModifierComponent

A class in Root.Township, the global namespace.

Goes on an arrow part (such as fletching). When the part is crafted onto an arrow it adds its flight modifier to that Arrow, and removes it when taken off.

Constructors​

MemberWhat it is
ArrowFlightModifierComponent()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

2 private and internal fields
MemberWhat it is
private CraftingPart craftingPartThe crafting part whose connection is watched.
private ArrowFlightSettingsModifier modifierBacking field for Modifier.

Properties​

MemberWhat it is
ArrowFlightSettingsModifier Modifier { get; }The flight settings modifier this part adds.

Methods​

3 private and internal methods
MemberWhat it is
private void Awake()Subscribes to the crafting part's crafted and decrafted events.
private void OnCrafted(CraftingPart slot, bool isLoad)Adds the modifier to the Arrow above the connected part.
private void OnDecrafted(CraftingPart obj, bool isLoad)Removes the modifier from the Arrow above the connected part.