TriggerSoundEmitter
A class in Root.Township, the global namespace.
A sphere trigger that plays a sound when something enters. Only the arrow woosh is handled: it plays when an arrow passes near the local player.
- Listed in Global namespace: T to X
- Inherits or implements
MonoBehaviour - Attributes
RequireComponent
Constructors
| Member | What it is |
|---|---|
TriggerSoundEmitter() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|---|
private SoundEffect sound | The sound effect to play. |
private SphereCollider sphereCollider | The trigger sphere, set up from triggerRadius. |
private float triggerRadius | Radius copied onto the sphere collider in the editor. |