A class in Root.Township, Alta.Impact.
Fires an AltaEvent when an ImpactDetector takes a hit with enough damage and of an allowed impact type.
Constructors
| Member | What it is |
|---|
ImpactHitTrigger() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private ImpactDetector detector | The impact detector listened to. |
private ImpactTypeFilter impactTypeFilter | Which impact types count. |
private float minDamageToDetect | Lowest health damage that counts. |
private AltaEvent trigger | Event invoked on a valid hit. |
Methods
3 private and internal methods
| Member | What it is |
|---|
private void CheckForValidHit(ImpactHit impact) | Invokes trigger if the hit's damage and impact type pass. |
private void OnDisable() | Unhooks the detector's Hit event. |
private void OnEnable() | Hooks the detector's Hit event. |