A class in Root.Township, the global namespace.
Timer logic that switches on for a while each time an impact detector is hit, raising a bool event when it turns on and off.
Constructors
Fields
2 private and internal fields
| Member | What it is |
|---|
private ImpactDetector impactDetector | The detector to watch. |
private BoolUnityEvent onHitChanged | Event raised with true when hit and false when the timer runs out. |
Methods
2 private and internal methods
| Member | What it is |
|---|
private void Awake() | Hooks the detector's hits and forwards the timer toggle to onHitChanged. |
private void WasHit(ImpactHit impact) | Starts the active timer when the detector is hit. |