Skip to main content

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​

MemberWhat it is
protected TriggerImpactDetectorBase()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private ImpactChannel[] channelsImpact channels checked.
private ImpactType impactTypeImpact type used for the trigger hit.
private float minEfficiencyToEffectLowest efficiency that runs HitEffect.

Methods​

MemberWhat it is
protected abstract void HitEffect(ContactPointStructure contact)Subclasses do their effect for the contact.
1 private and internal method
MemberWhat 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.