Skip to main content

AttackDirectionReactAIHook

A class in Root.Township, Alta.Intelligence.

AI hook that runs an attack direction reaction (from AttackDirectionCoreSettings) on the creature for as long as the action runs.

Constructors​

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

Fields​

2 private and internal fields
MemberWhat it is
private Dictionary<IAgent, HookAction> actionsThe running reaction per creature.
private AttackDirectionCoreSettings settingsThe attack direction settings the reaction uses.

Methods​

MemberWhat it is
protected override void FinishedOrCancelled(IActiveAction finished)Disables and drops the creature's reaction.
protected override void Used(IActiveAction active)Starts a new reaction for the creature, disabling any old one first.