AttackDirectionCoreSettings
A class in Root.Township, Alta.Intelligence.
Settings asset that makes a creature animate in response to where its target is attacking from (above or either side). GetCore makes the runtime AttackDirectionCore.
- Listed in Creatures and AI
- Inherits or implements
ScriptableObject
- Attributes
CreateAssetMenu
Constructors
| Member | What it is |
|---|
AttackDirectionCoreSettings() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
7 private and internal fields
| Member | What it is |
|---|
private float animationChangeDuration | Seconds to blend the reaction animations to a new direction. |
private float height | Height above the target's ground position used to judge where an attack comes from. |
private bool isFacingTarget | Whether the agent turns to face its target while this runs. |
private AttackDirectionAnimationSettings layer | Animation that switches the reaction layer on while an attack is incoming. |
private float minDamage | Attacks at or below this damage are ignored. |
private AttackDirectionAnimationSettings side | Animation for attacks coming from the left or right. |
private AttackDirectionAnimationSettings up | Animation for attacks coming from above. |
Properties
| Member | What it is |
|---|
float AnimationChangeDuration { get; } | Seconds to blend the direction animations to a new value. |
float Height { get; } | Height above the target's ground position used as the reference point for attack directions. |
bool IsFacingTarget { get; } | If true the creature turns to face its target while the core runs. |
AttackDirectionAnimationSettings Layer { get; } | Animation switched on whenever an attack above MinDamage is seen. |
float MinDamage { get; } | Target attacks with damage below this are ignored. |
AttackDirectionAnimationSettings Side { get; } | Animation set left or right for attacks from the side. |
AttackDirectionAnimationSettings Up { get; } | Animation set for attacks from above. |
Methods
Used in
Members of other types that take, return or hold a AttackDirectionCoreSettings: