TriggerImpactDetectorBase
An abstract class in Root.Township, Alta.Impact.
Base for a trigger that reacts when an ImpactTool passes through it with enough effectiveness on the chosen channels.
Constructors
| Member | What it is |
|---|
protected TriggerImpactDetectorBase() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private ImpactChannel[] channels | Impact channels checked. |
private ImpactType impactType | Impact type used for the trigger hit. |
private float minEfficiencyToEffect | Lowest efficiency that runs HitEffect. |
Methods
| Member | What it is |
|---|
protected abstract void HitEffect(ContactPointStructure contact) | Subclasses do their effect for the contact. |
1 private and internal method
| Member | What it is |
|---|
private void OnTriggerEnter(Collider other) | For a collider on layer 0 with an ImpactTool rigidbody, works out a trigger hit and calls HitEffect if effective enough. |