AiHook<T>
An abstract class in Root.Township, Alta.Intelligence.
Base for a component that hooks an effect onto an action: placed next to an ActionComponent, it runs Used whenever any creature starts that action and FinishedOrCancelled when it ends.
- Listed in Creatures and AI
- Inherits or implements
MonoBehaviour,IAiHook - Derived types
AiHook - Documented in Actions and decisions
Constructors
| Member | What it is |
|---|---|
protected AiHook() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
2 private and internal fields
Methods
| Member | What it is |
|---|---|
protected virtual void FinishedOrCancelled(IActiveAction finished) | Called when a creature's run of the action ends. Unhooks itself; subclasses undo their effect here. |
protected virtual void Used(IActiveAction active) | Called when a creature starts the action. Hooks FinishedOrCancelled onto the finish and cancel events as set. |