DirectionalMultiplierCollider
A class in Root.Township, Alta.Impact.
Collider modifier asset that scales damage by the angle a hit comes from, relative to a set direction. A hit whose curve value is 0 or less doesn't count as damaging.
- Listed in Items, inventory and logic
- Inherits or implements
ColliderModifierSettings - Attributes
CreateAssetMenu - Documented in Impacts and hit detection
Constructors
| Member | What it is |
|---|---|
DirectionalMultiplierCollider() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
3 private and internal fields
Methods
| Member | What it is |
|---|---|
override bool IsDamaging(ImpactDetectorColliderModifier modifier, ImpactTool tool, ContactPointStructure point) | Works out the angle between the hit and the rotated direction, stores the curve value, and returns true if it's above 0. |
override void ModifyHit(ImpactDetectorColliderModifier modifier, ImpactHitWithTool hit, ContactPointStructure point) | Multiplies the hit's health and cripple multipliers by the value stored in IsDamaging, then resets it to 1. |