CollisionSoundEmitter
A class in Root.Township, the global namespace.
Plays the object collision sound at the contact point on a hit, with layer filtering and a short cooldown.
- Listed in Global namespace: C to D
- Inherits or implements
MonoBehaviour
Constructors
| Member | What it is |
|---|---|
CollisionSoundEmitter() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
Methods
1 private and internal method
| Member | What it is |
|---|---|
private void OnCollisionEnter(Collision collision) | Plays SoundEffect.ObjectCollision at the contact unless the other layer is ignored or it's within the cooldown. |